aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_page.c
diff options
context:
space:
mode:
authorJohn Dyson <dyson@FreeBSD.org>1996-06-26 05:39:27 +0000
committerJohn Dyson <dyson@FreeBSD.org>1996-06-26 05:39:27 +0000
commit38efa82b23764acb0ee0ae9ecbf70679aa8acc53 (patch)
tree48f770f322cba924e42b174cb8cb3f34755ab4ff /sys/vm/vm_page.c
parentd04d75dd99e67bffd883b4258024f32056593e9d (diff)
downloadsrc-38efa82b23764acb0ee0ae9ecbf70679aa8acc53.tar.gz
src-38efa82b23764acb0ee0ae9ecbf70679aa8acc53.zip
This commit does a couple of things:
Re-enables the RSS limiting, and the routine is now tail-recursive, making it much more safe (eliminates the possiblity of kernel stack overflow.) Also, the RSS limiting is a little more intelligent about finding the likely objects that are pushing the process over the limit. Added some sysctls that help with VM system tuning. New sysctl features: 1) Enable/disable lru pageout algorithm. vm.pageout_algorithm = 0, default algorithm that works well, especially using X windows and heavy memory loading. Can have adverse effects, sometimes slowing down program loading. vm.pageout_algorithm = 1, close to true LRU. Works much better than clock, etc. Does not work as well as the default algorithm in general. Certain memory "malloc" type benchmarks work a little better with this setting. Please give me feedback on the performance results associated with these. 2) Enable/disable swapping. vm.swapping_enabled = 1, default. vm.swapping_enabled = 0, useful for cases where swapping degrades performance. The config option "NO_SWAPPING" is still operative, and takes precedence over the sysctl. If "NO_SWAPPING" is specified, the sysctl still exists, but "vm.swapping_enabled" is hard-wired to "0". Each of these can be changed "on the fly."
Notes
Notes: svn path=/head/; revision=16750
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r--sys/vm/vm_page.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 880c3dd6f85d..4a95e6e1f1d6 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
- * $Id: vm_page.c,v 1.58 1996/06/17 03:35:37 dyson Exp $
+ * $Id: vm_page.c,v 1.59 1996/06/21 05:39:22 dyson Exp $
*/
/*
@@ -693,6 +693,7 @@ vm_page_alloc(object, pindex, page_req)
}
m->wire_count = 0;
m->hold_count = 0;
+ m->act_count = 0;
m->busy = 0;
m->valid = 0;
m->dirty = 0;
@@ -740,6 +741,8 @@ vm_page_activate(m)
if (m->wire_count == 0) {
TAILQ_INSERT_TAIL(&vm_page_queue_active, m, pageq);
m->queue = PQ_ACTIVE;
+ if (m->act_count < ACT_INIT)
+ m->act_count = ACT_INIT;
cnt.v_active_count++;
}
splx(s);