summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-02-08 02:42:13 +0000
committerdillon <dillon@FreeBSD.org>1999-02-08 02:42:13 +0000
commite402e06da9c1a92c9f9a4aff4e0f6a616c402b6c (patch)
tree576f493b48349d3fa12752d1fb27f742af833aac /sys/powerpc/aim
parent224065be12d96523e4cb568367d79849c55965d6 (diff)
downloadFreeBSD-src-e402e06da9c1a92c9f9a4aff4e0f6a616c402b6c.zip
FreeBSD-src-e402e06da9c1a92c9f9a4aff4e0f6a616c402b6c.tar.gz
Adjust idle zero-page fill hysteresis based on tests. Use 2/3 and 4/5
zero-fill levels. Adjust comment for ozfod in vmmeter.h - this counter represents non-optimal ( on the fly ) zero fills, not prefills.
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r--sys/powerpc/aim/vm_machdep.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index 9881c5f..658f730 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $Id: vm_machdep.c,v 1.9 1999/02/08 00:37:35 dillon Exp $
+ * $Id: vm_machdep.c,v 1.10 1999/02/08 00:47:32 dillon Exp $
*/
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -443,6 +443,10 @@ SYSCTL_INT(_machdep, OID_AUTO, cnt_prezero, CTLFLAG_RD, &cnt_prezero, 0, "");
* Implement the pre-zeroed page mechanism.
* This routine is called from the idle loop.
*/
+
+#define ZIDLE_LO(v) ((v) * 2 / 3)
+#define ZIDLE_HI(v) ((v) * 4 / 5)
+
int
vm_page_zero_idle()
{
@@ -460,9 +464,9 @@ vm_page_zero_idle()
* pages because doing so may flush our L1 and L2 caches too much.
*/
- if (zero_state && vm_page_zero_count >= cnt.v_free_count / 3)
+ if (zero_state && vm_page_zero_count >= ZIDLE_LO(cnt.v_free_count))
return(0);
- if (vm_page_zero_count >= cnt.v_free_count / 2)
+ if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count))
return(0);
#ifdef SMP
@@ -491,7 +495,7 @@ vm_page_zero_idle()
pageq);
++vm_page_zero_count;
++cnt_prezero;
- if (vm_page_zero_count >= cnt.v_free_count / 2)
+ if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count))
zero_state = 1;
}
free_rover = (free_rover + PQ_PRIME3) & PQ_L2_MASK;
OpenPOWER on IntegriCloud