From c7ee2c66ef026d9121744c95b363c1a9022d668b Mon Sep 17 00:00:00 2001 From: alc Date: Mon, 18 Jun 2007 02:04:38 +0000 Subject: 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 --- sys/vm/vm_pageout.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sys/vm/vm_pageout.c') diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 1d89f7a..7dc7040 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -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 @@ more: 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 @@ more: 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); -- cgit v1.1