Yet more scheduler work. Revamp the batch detection heuristic and fix a few
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 29 Jun 2005 01:25:10 +0000 (01:25 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 29 Jun 2005 01:25:10 +0000 (01:25 +0000)
commit27df5e1e2ef486315dfd0326e69b78ab7b5ebd42
treea41ee3bb1937baba25c81c2d7934ca0d78c65547
parentd542b1f4c48cbb4a026796aff492b2eceec3e4f2
Yet more scheduler work.  Revamp the batch detection heuristic and fix a few
things here and there.  Test the algorithm against buildworlds, mozilla,
gnome-terminal, and pine all running at once.

* Fix a bug in how I handle p_slptime.
* Move the ++p_cptime out of usched_bsd4 and into kern_clock.c.
* Redo the batch heuristic, boost the cost of doing a fork, and
  slowly decrement p_origcpu to compensate for long-running
  processes.
* Use an instantanious load instead of a time-averaged load in the
  decay calculation.

TODO: the SMP support will be virtually identical across all schedulers
and should probably be abstracted out of usched_*.c.
bin/ps/extern.h
bin/ps/keyword.c
bin/ps/print.c
sys/kern/kern_clock.c
sys/sys/usched.h