cpuidle: governor: menu: don't use loadavg
authorColin Cross <ccross@android.com>
Mon, 19 Sep 2011 23:42:44 +0000 (16:42 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:52:31 +0000 (13:52 -0800)
get_loadavg doesn't work as intended.  According to the comments, it
should be returning an average over a few seconds, but it is actually
reading the instantaneous load.  It is almost always returning 0, but
can sometimes, depending on workload, spike very high into the hundreds
even when the average cpu load is under 10%.  Disable it for now.

Change-Id: I63ed100af1cf9463549939b8113ed83676db5f86
Signed-off-by: Colin Cross <ccross@android.com>
drivers/cpuidle/governors/menu.c

index 22e4463d1787ab3d37aaaa61cfc402c16a315a2d..0846b39b4ca6dd467a35914f2292ff4af6e485f4 100644 (file)
@@ -178,7 +178,12 @@ static inline int performance_multiplier(unsigned long nr_iowaiters, unsigned lo
 
        /* for higher loadavg, we are more reluctant */
 
-       mult += 2 * get_loadavg(load);
+       /*
+        * this doesn't work as intended - it is almost always 0, but can
+        * sometimes, depending on workload, spike very high into the hundreds
+        * even when the average cpu load is under 10%.
+        */
+       /* mult += 2 * get_loadavg(); */
 
        /* for IO wait tasks (per cpu!) we add 5x each */
        mult += 10 * nr_iowaiters;