cpuquiet: Update averaging of nr_runnables
authorHuang, Tao <huangtao@rock-chips.com>
Mon, 18 May 2015 09:17:28 +0000 (17:17 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 18 May 2015 09:17:28 +0000 (17:17 +0800)
commit0c1b12d1c3afc5d4297f60fbbb971f9783acf20f
tree3792d32e7e7768829c549fe4913b3636631fa73e
parente615617818feacd99e35995832b32df49e214b6c
cpuquiet: Update averaging of nr_runnables

Doing a Exponential moving average per nr_running++/-- does not
guarantee a fixed sample rate which induces errors if there are lots of
threads being enqueued/dequeued from the rq (Linpack mt). Instead of
keeping track of the avg, the scheduler now keeps track of the integral
of nr_running and allows the readers to perform filtering on top.

Implemented a proper exponential moving average for the runnables
governor and a straight 100ms average for the balanced governor. Tweaked
the thresholds for the runnables governor to minimize latency. Also,
decreased sample_rate for the runnables governor to the absolute minimum
of 10msecs.

Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
include/linux/sched.h
kernel/sched/core.c
kernel/sched/sched.h