Eliminate unnecessary checks from vm_pageout_clean(): The page that is

passed to vm_pageout_clean() cannot possibly be PG_UNMANAGED because
it came from the inactive queue and PG_UNMANAGED pages are not in any
page queue.  Moreover, PG_UNMANAGED pages only exist in OBJT_PHYS
objects, and all pages within a OBJT_PHYS object are PG_UNMANAGED.
So, if the page that is passed to vm_pageout_clean() is not
PG_UNMANAGED, then it cannot be from an OBJT_PHYS object and its
neighbors from the same object cannot themselves be PG_UNMANAGED.

Reviewed by:	tegge
This commit is contained in:
alc 2007-06-18 02:04:38 +00:00
parent 6fa1a15c61
commit c7ee2c66ef

View File

@ -292,11 +292,10 @@ vm_pageout_clean(m)
*/
/*
* Don't mess with the page if it's busy, held, or special
* Can't clean the page if it's busy or held.
*/
if ((m->hold_count != 0) ||
((m->busy != 0) || (m->oflags & VPO_BUSY) ||
(m->flags & PG_UNMANAGED))) {
((m->busy != 0) || (m->oflags & VPO_BUSY))) {
return 0;
}
@ -340,8 +339,7 @@ vm_pageout_clean(m)
break;
}
if (VM_PAGE_INQUEUE1(p, PQ_CACHE) ||
(p->oflags & VPO_BUSY) || p->busy ||
(p->flags & PG_UNMANAGED)) {
(p->oflags & VPO_BUSY) || p->busy) {
ib = 0;
break;
}
@ -371,8 +369,7 @@ vm_pageout_clean(m)
if ((p = vm_page_lookup(object, pindex + is)) == NULL)
break;
if (VM_PAGE_INQUEUE1(p, PQ_CACHE) ||
(p->oflags & VPO_BUSY) || p->busy ||
(p->flags & PG_UNMANAGED)) {
(p->oflags & VPO_BUSY) || p->busy) {
break;
}
vm_page_test_dirty(p);