summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1997-01-11 07:22:24 +0000
committerdyson <dyson@FreeBSD.org>1997-01-11 07:22:24 +0000
commit9215dc1c36b89d0960bb5c0f4a74fa200106b328 (patch)
tree6ba0c04fa0ace60f46b36c233175ab9fce5fc4c7 /sys
parent73dafb0b2c5ef4f0b641cf8ef4b4608fdc20a6fe (diff)
downloadFreeBSD-src-9215dc1c36b89d0960bb5c0f4a74fa200106b328.zip
FreeBSD-src-9215dc1c36b89d0960bb5c0f4a74fa200106b328.tar.gz
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_pageout.c12
1 files changed, 7 insertions, 5 deletions
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);
}
OpenPOWER on IntegriCloud