diff options
author | dyson <dyson@FreeBSD.org> | 1996-05-24 05:17:21 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-05-24 05:17:21 +0000 |
commit | 992a2cacdcd25ca37b429968cfc112d31325bffd (patch) | |
tree | a8c2c1507816fe2f08199b34bc9e4fa8a9c83f07 /sys/vm | |
parent | 5ff3dd6648cbbe60b55533ce971e45cc65804fb0 (diff) | |
download | FreeBSD-src-992a2cacdcd25ca37b429968cfc112d31325bffd.zip FreeBSD-src-992a2cacdcd25ca37b429968cfc112d31325bffd.tar.gz |
Eliminate inefficient check for dirty pages for pages in the PQ_CACHE
queue. Also, modify the MADV_FREE policy (it probably still isn't the final
version.)
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index da2c62c..c5ce5c3 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.72 1996/05/21 17:13:31 dyson Exp $ + * $Id: vm_object.c,v 1.73 1996/05/23 00:45:58 dyson Exp $ */ /* @@ -516,6 +516,10 @@ rescan: if ((tp->flags & PG_BUSY) || (tp->flags & PG_CLEANCHK) == 0) break; + if (tp->queue == PQ_CACHE) { + tp->flags &= ~PG_CLEANCHK; + break; + } vm_page_test_dirty(tp); if ((tp->dirty & tp->valid) == 0) { tp->flags &= ~PG_CLEANCHK; @@ -536,6 +540,10 @@ rescan: if ((tp->flags & PG_BUSY) || (tp->flags & PG_CLEANCHK) == 0) break; + if (tp->queue == PQ_CACHE) { + tp->flags &= ~PG_CLEANCHK; + break; + } vm_page_test_dirty(tp); if ((tp->dirty & tp->valid) == 0) { tp->flags &= ~PG_CLEANCHK; @@ -740,8 +748,13 @@ vm_object_madvise(object, pindex, count, advise) */ if (object->type == OBJT_SWAP) swap_pager_dmzspace(object, m->pindex, 1); +/* vm_page_protect(m, VM_PROT_NONE); vm_page_free(m); +*/ + pmap_clear_modify(VM_PAGE_TO_PHYS(m)); + m->dirty = 0; + vm_page_cache(m); } } } |