mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-24 10:52:36 +01:00
Undo part of the scalability commit. Many of the changes
in vm_fault had some performance enhancements not ready for prime time. This commit backs out some of the changes.
This commit is contained in:
parent
94a04fd972
commit
f230c45cbe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17312
@ -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.53 1996/07/02 02:07:59 dyson Exp $
|
||||
* $Id: vm_fault.c,v 1.54 1996/07/27 03:23:52 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -293,7 +293,8 @@ RetryFault:;
|
||||
|
||||
m->flags |= PG_BUSY;
|
||||
|
||||
if (((m->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL) &&
|
||||
if (m->valid &&
|
||||
((m->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL) &&
|
||||
m->object != kernel_object && m->object != kmem_object) {
|
||||
goto readrest;
|
||||
}
|
||||
@ -395,18 +396,20 @@ readrest:
|
||||
reqpage) : VM_PAGER_FAIL;
|
||||
|
||||
if (rv == VM_PAGER_OK) {
|
||||
/*
|
||||
* Found the page. Leave it busy while we play
|
||||
* with it.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Relookup in case pager changed page. Pager
|
||||
* is responsible for disposition of old page
|
||||
* if moved.
|
||||
*/
|
||||
if ((m->object != object) || (m->pindex != pindex) ||
|
||||
(m->flags & PG_TABLED) == 0) {
|
||||
m = vm_page_lookup(object, pindex);
|
||||
if( !m) {
|
||||
UNLOCK_AND_DEALLOCATE;
|
||||
goto RetryFault;
|
||||
}
|
||||
m = vm_page_lookup(object, pindex);
|
||||
if( !m) {
|
||||
UNLOCK_AND_DEALLOCATE;
|
||||
goto RetryFault;
|
||||
}
|
||||
|
||||
hardfault++;
|
||||
@ -478,26 +481,9 @@ readrest:
|
||||
}
|
||||
first_m = NULL;
|
||||
|
||||
if ((m->flags & PG_ZERO) == 0) {
|
||||
if (vm_page_zero_count) {
|
||||
vm_page_protect(m, VM_PROT_NONE);
|
||||
PAGE_WAKEUP(m);
|
||||
vm_page_free(m);
|
||||
m = vm_page_alloc(object, pindex, VM_ALLOC_ZERO);
|
||||
if (!m)
|
||||
panic("vm_fault: missing zero page");
|
||||
/*
|
||||
* This should not be true, but just in case...
|
||||
*/
|
||||
if ((m->flags & PG_ZERO) == 0) {
|
||||
vm_page_zero_fill(m);
|
||||
cnt.v_zfod++;
|
||||
}
|
||||
} else {
|
||||
vm_page_zero_fill(m);
|
||||
cnt.v_zfod++;
|
||||
}
|
||||
}
|
||||
if ((m->flags & PG_ZERO) == 0)
|
||||
vm_page_zero_fill(m);
|
||||
cnt.v_zfod++;
|
||||
break;
|
||||
} else {
|
||||
if (object != first_object) {
|
||||
|
Loading…
Reference in New Issue
Block a user