diff options
author | John Dyson <dyson@FreeBSD.org> | 1997-01-11 07:22:24 +0000 |
---|---|---|
committer | John Dyson <dyson@FreeBSD.org> | 1997-01-11 07:22:24 +0000 |
commit | d4a272db61cb3899063cd6fbff98e73ba0ed03c0 (patch) | |
tree | 6ba0c04fa0ace60f46b36c233175ab9fce5fc4c7 /sys/vm | |
parent | 9b5a5d81be1a965e3690e8601e07499ef824af14 (diff) | |
download | src-d4a272db61cb3899063cd6fbff98e73ba0ed03c0.tar.gz src-d4a272db61cb3899063cd6fbff98e73ba0ed03c0.zip |
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.
Notes
Notes:
svn path=/head/; revision=21530
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_pageout.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index cbe580c3acf0..deafd38b6052 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); } |