cpuquiet: Update averaging of nr_runnables
authorSai Charan Gurrappadi <sgurrappadi@nvidia.com>
Sat, 25 Aug 2012 01:42:36 +0000 (18:42 -0700)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 18 May 2015 08:07:08 +0000 (16:07 +0800)
commitf0b39965494d737d33647f8a732059e059c429b7
treec9f134ef9b83a1d1a77f970417d5b0ff2a2f24af
parent14d64ba7d1f7a845f48dc7e175c49a03ffbf3be8
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.

Updated to K3.4

Change-Id: Ia25bf8baf2a1a015ba188b2c06e551e89b16c5f8
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-on: http://git-master/r/131147
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
drivers/cpuquiet/governors/balanced.c
drivers/cpuquiet/governors/runnable_threads.c