Minor performance improvements, additional prototype for additional

exported symbol.
This commit is contained in:
John Dyson 1995-09-06 05:37:43 +00:00
parent 5e887e181c
commit ced399ee65
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10576
3 changed files with 11 additions and 7 deletions

View File

@ -66,7 +66,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_fault.c,v 1.27 1995/09/03 20:40:41 dyson Exp $
* $Id: vm_fault.c,v 1.28 1995/09/04 04:44:26 dyson Exp $
*/
/*
@ -639,6 +639,7 @@ readrest:
}
m->flags |= PG_MAPPED|PG_REFERENCED;
m->flags &= ~PG_ZERO;
pmap_enter(map->pmap, vaddr, VM_PAGE_TO_PHYS(m), prot, wired);
#if 0
@ -845,8 +846,7 @@ vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry)
* Enter it in the pmap...
*/
dst_m->flags |= PG_WRITEABLE;
dst_m->flags |= PG_MAPPED;
dst_m->flags |= PG_WRITEABLE|PG_MAPPED;
pmap_enter(dst_map->pmap, vaddr, VM_PAGE_TO_PHYS(dst_m),
prot, FALSE);
@ -878,7 +878,8 @@ vm_fault_page_lookup(object, offset, rtobject, rtoffset, rtm)
*rtoffset = 0;
while (!(m = vm_page_lookup(object, offset))) {
if (vm_pager_has_page(object, object->paging_offset + offset, NULL, NULL)) {
if (vm_pager_has_page(object,
object->paging_offset + offset, NULL, NULL)) {
*rtobject = object;
*rtoffset = offset;
return 1;

View File

@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91
* $Id: vnode_pager.c,v 1.45 1995/09/04 00:21:16 dyson Exp $
* $Id: vnode_pager.c,v 1.46 1995/09/04 04:44:25 dyson Exp $
*/
/*
@ -207,6 +207,8 @@ vnode_pager_haspage(object, offset, before, after)
after, before);
if (err)
return TRUE;
if (((long) bn) < 0)
return FALSE;
poff = (offset - (reqblock * bsize)) / PAGE_SIZE;
if (before) {
*before *= pagesperblock;
@ -216,7 +218,7 @@ vnode_pager_haspage(object, offset, before, after)
*after *= pagesperblock;
*after += (pagesperblock - (poff + 1));
}
return ((long) bn < 0 ? FALSE : TRUE);
return TRUE;
}
/*

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vnode_pager.h 8.1 (Berkeley) 6/11/93
* $Id: vnode_pager.h,v 1.4 1995/01/09 16:06:02 davidg Exp $
* $Id: vnode_pager.h,v 1.5 1995/07/13 08:48:48 davidg Exp $
*/
#ifndef _VNODE_PAGER_
@ -49,6 +49,7 @@ int vnode_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
int vnode_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
boolean_t vnode_pager_haspage __P((vm_object_t, vm_offset_t, int *, int *));
struct vnode *vnode_pager_lock __P((vm_object_t));
void vnode_pager_freepage __P((vm_page_t m));
#endif
#endif /* _VNODE_PAGER_ */