kernel - Add usched_dfly algorith, set as default for now (4)
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 19 Sep 2012 03:55:18 +0000 (20:55 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 19 Sep 2012 03:55:18 +0000 (20:55 -0700)
commit08bb2a8309b22300155c1fafe69f9a46d3526e44
tree95fa3bd9d6263079dc7811ec9ce4fb6d75020de6
parent582fd846b1d9c1fb2b0757c930ab441fbe4d7ff4
kernel - Add usched_dfly algorith, set as default for now (4)

* Fix fork regression with usched_dfly.  Most fork/exec sequences involve
  the parent waiting.  The new scheduler was placing the newly forked
  process on another cpu which is non-optimal if the parent is going
  to immediately wait.

  Instead if there is nothing else waiting to run on the current cpu,
  leave the forked process on the current cpu initially.  If the parent
  waits quickly the forked process will get cpu, otherwise it will get
  scheduled away soon enough.  If the parent forks additional children
  then we find there is something on the queue now (the first child) and
  put the additional children on other cpus.

Reported-by: thesjg
sys/kern/usched_dfly.c
sys/sys/usched.h