Module Name:    src
Committed By:   yamt
Date:           Thu Apr 14 16:19:35 UTC 2011

Modified Files:
        src/sys/kern: sched_4bsd.c

Log Message:
bluntly balance estcpu decay for ncpu > 1.  PR/31966.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/sched_4bsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/sched_4bsd.c
diff -u src/sys/kern/sched_4bsd.c:1.25 src/sys/kern/sched_4bsd.c:1.26
--- src/sys/kern/sched_4bsd.c:1.25	Sun May 31 04:13:33 2009
+++ src/sys/kern/sched_4bsd.c	Thu Apr 14 16:19:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched_4bsd.c,v 1.25 2009/05/31 04:13:33 yamt Exp $	*/
+/*	$NetBSD: sched_4bsd.c,v 1.26 2011/04/14 16:19:35 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sched_4bsd.c,v 1.25 2009/05/31 04:13:33 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sched_4bsd.c,v 1.26 2011/04/14 16:19:35 yamt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -236,7 +236,7 @@
  */
 
 /* calculations for digital decay to forget 90% of usage in 5*loadav sec */
-#define	loadfactor(loadav)	(2 * (loadav))
+#define	loadfactor(loadav)	(2 * (loadav) / ncpu)
 
 static fixpt_t
 decay_cpu(fixpt_t loadfac, fixpt_t estcpu)

Reply via email to