diff options
author | alc <alc@FreeBSD.org> | 2007-06-18 02:04:38 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2007-06-18 02:04:38 +0000 |
commit | c7ee2c66ef026d9121744c95b363c1a9022d668b (patch) | |
tree | 9c5e295bfbe409c93bfde3be2aae1259b6dc2f6c /sys | |
parent | 6fa1a15c61e3075aa4b011af00e1013112329e85 (diff) | |
download | FreeBSD-src-c7ee2c66ef026d9121744c95b363c1a9022d668b.zip FreeBSD-src-c7ee2c66ef026d9121744c95b363c1a9022d668b.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_pageout.c | 11 |
1 files changed, 4 insertions, 7 deletions
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); |