DragonFly BSD
DragonFly submit List (threaded) for 2010-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Restore hysteresis to vm_zeroidle


From: Venkatesh Srinivas <me@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 May 2010 01:13:56 -0400 (EDT)

Hi,

--- vm_zeroidle.c.orig	2010-05-23 18:15:43.000000000 -0400
+++ vm_zeroidle.c	2010-05-24 00:40:23.000000000 -0400
@@ -35,8 +35,6 @@
  *	from: @(#)vm_machdep.c	7.3 (Berkeley) 5/13/91
  *	Utah $Hdr: vm_machdep.c	1.16.1.1 89/06/23$
  * from FreeBSD: .../i386/vm_machdep.c,v 1.165 2001/07/04 23:27:04 dillon
- *
- * $Id: vm_zeroidle.c,v 1.3 2010/05/12 04:50:45 sv5679 Exp $
  */

 #include <sys/param.h>
@@ -67,7 +65,6 @@
 /* Maximum number of pages per second to zero */
 #define NPAGES_RUN	(20000)

-
static int idlezero_enable = 0;
TUNABLE_INT("vm.idlezero_enable", &idlezero_enable);
SYSCTL_INT(_vm, OID_AUTO, idlezero_enable, CTLFLAG_RW, &idlezero_enable, 0,
@@ -107,8 +104,11 @@
return (0);
if (zero_state && vm_page_zero_count >= ZIDLE_LO(vmstats.v_free_count))
return (0);
- if (vm_page_zero_count >= ZIDLE_HI(vmstats.v_free_count))
+ if (vm_page_zero_count >= ZIDLE_HI(vmstats.v_free_count)) {
+ zero_state = 1;
return (0);
+ }
+ zero_state = 0;
return (1);
}


Should restore hysteresis to the idle zero logic. The simplest way to do this was to add the zero_state set to vm_page_zero_check().

-- vs



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]