summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/vm_machdep.c
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/amd64/amd64/vm_machdep.c
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/amd64/amd64/vm_machdep.c')
-rw-r--r--sys/amd64/amd64/vm_machdep.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 2e9e6aa..5ea99bf 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/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.116 1999/01/29 08:36:42 dillon Exp $
+ * $Id: vm_machdep.c,v 1.117 1999/02/08 00:37:35 dillon Exp $
*/
#include "npx.h"
@@ -586,6 +586,10 @@ SYSCTL_INT(_vm_stats_misc, OID_AUTO,
* 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()
{
@@ -603,9 +607,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
@@ -635,7 +639,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