From 9215dc1c36b89d0960bb5c0f4a74fa200106b328 Mon Sep 17 00:00:00 2001 From: dyson Date: Sat, 11 Jan 1997 07:22:24 +0000 Subject: Slightly correct the code that moves pages from the active to the inactive queue. This is only a minor performance improvement, but will not affect perf on machines that don't have ref bits. --- sys/vm/vm_pageout.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index cbe580c..deafd38 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -65,7 +65,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pageout.c,v 1.88 1997/01/01 04:45:05 dyson Exp $ + * $Id: vm_pageout.c,v 1.89 1997/01/03 17:02:28 dyson Exp $ */ /* @@ -811,10 +811,12 @@ rescan0: if (vm_pageout_algorithm_lru || (m->object->ref_count == 0) || (m->act_count == 0)) { --page_shortage; - vm_page_protect(m, VM_PROT_NONE); - if ((m->dirty == 0) && - (m->object->ref_count == 0)) { - vm_page_cache(m); + if (m->object->ref_count == 0) { + vm_page_protect(m, VM_PROT_NONE); + if (m->dirty == 0) + vm_page_cache(m); + else + vm_page_deactivate(m); } else { vm_page_deactivate(m); } -- cgit v1.1