kernel - Fix uload calculation in usched_dfly
commit7df82bbe6aadd740b9a45f12e1bce1bf3a237db7
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Aug 2017 03:29:06 +0000 (15 20:29 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Aug 2017 03:29:06 +0000 (15 20:29 -0700)
tree7b1c6ea955f66329ebdf6c89a01db9ff397c7259
parenta07abcb98fb0546c5d1625e3fe5898ff4e730b90
kernel - Fix uload calculation in usched_dfly

* When a very large number of processes are runnable (greater than 32767),
  the uload rollup field in dfly_pcpu[] can overflow.  In addition, the
  delta calculation for individual processes can also overflow.

  Fix both cases.

* Symptoms: one cpu starts getting an excessive percentage of the process
  load as the system attempts to continuously rebalance into it.
sys/kern/usched_dfly.c