summaryrefslogtreecommitdiff
path: root/fs/proc
diff options
context:
space:
mode:
authorSai Charan Gurrappadi <sgurrappadi@nvidia.com>2012-08-24 18:42:36 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 12:34:24 -0700
commit2413a06b9892c5e12a28b9127e64d9632c42dfeb (patch)
tree046bf4914878d1f16b675ae7f84cc62712bbb1ed /fs/proc
parenteca4ff7a2ef49b7500452acf3c3723b3cf1c06de (diff)
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> Rebase-Id: R7a20292e2cfb551a875962f0903647f69b78a0ab
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/loadavg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/proc/loadavg.c b/fs/proc/loadavg.c
index 8d95888b22cd..1afa4dd4cae2 100644
--- a/fs/proc/loadavg.c
+++ b/fs/proc/loadavg.c
@@ -13,17 +13,15 @@
static int loadavg_proc_show(struct seq_file *m, void *v)
{
unsigned long avnrun[3];
- unsigned long time_avnrun = avg_nr_running();
get_avenrun(avnrun, FIXED_1/200, 0);
- seq_printf(m, "%lu.%02lu %lu.%02lu %lu.%02lu %ld/%d %d %lu.%02lu\n",
+ seq_printf(m, "%lu.%02lu %lu.%02lu %lu.%02lu %ld/%d %d\n",
LOAD_INT(avnrun[0]), LOAD_FRAC(avnrun[0]),
LOAD_INT(avnrun[1]), LOAD_FRAC(avnrun[1]),
LOAD_INT(avnrun[2]), LOAD_FRAC(avnrun[2]),
nr_running(), nr_threads,
- task_active_pid_ns(current)->last_pid,
- LOAD_INT(time_avnrun), LOAD_FRAC(time_avnrun));
+ task_active_pid_ns(current)->last_pid);
return 0;
}