Correct a problem with the user process scheduler's estimated cpu
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 11 Jul 2006 01:01:50 +0000 (01:01 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 11 Jul 2006 01:01:50 +0000 (01:01 +0000)
commitab55489282eb90d33aecc070f25cd0defb8fd159
tree52e40efce7f930b30783203ea4659188ea309f54
parente971284f7f3a187f443db2fdbd59d51643a216db
Correct a problem with the user process scheduler's estimated cpu
calculation.  lwp_slptime would sometimes not get reset to 0 after a
wakeup and cause a cpu-bound process to get more cpu then it deserves.

Move the estcpu call for calculations based on slptime to the tsleep code
and then unconditionally set lwp_slptime back to 0 after the process
wakes up again.
sys/kern/kern_synch.c
sys/kern/usched_bsd4.c