Subject: PR/31542 CVS commit: src/sys
To: None <,,>
From: YAMAMOTO Takashi <>
List: netbsd-bugs
Date: 11/01/2005 09:08:01
The following reply was made to PR kern/31542; it has been noted by GNATS.

From: YAMAMOTO Takashi <>
Subject: PR/31542 CVS commit: src/sys
Date: Tue,  1 Nov 2005 09:07:53 +0000 (UTC)

 Module Name:	src
 Committed By:	yamt
 Date:		Tue Nov  1 09:07:53 UTC 2005
 Modified Files:
 	src/sys/kern: kern_synch.c
 	src/sys/sys: proc.h
 Log Message:
 make scheduler work better when a system has many runnable processes
 by making p_estcpu fixpt_t.  PR/31542.
 1. schedcpu() decreases p_estcpu of all processes
    every seconds, by at least 1 regardless of load average.
 2. schedclock() increases p_estcpu of curproc by 1,
    at about 16 hz.
 in the consequence, if a system has >16 processes
 with runnable lwps, their p_estcpu are not likely increased.
 by making p_estcpu fixpt_t, we can decay it more slowly
 when loadavg is high.  (ie. solve #1.)
 i left kinfo_proc2::p_estcpu (ie. ps -O cpu) scaled because i have
 no idea about its absolute value's usage other than debugging,
 for which raw values are more valuable.
 To generate a diff of this commit:
 cvs rdiff -r1.152 -r1.153 src/sys/kern/kern_synch.c
 cvs rdiff -r1.206 -r1.207 src/sys/sys/proc.h
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.