Linux MM tree latest commits
 help / color / mirror / Atom feed
* + cpuidle-add-a-repeating-pattern-detector-to-the-menu-governor-fix.patch added to -mm tree
@ 2010-05-22 20:21 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2010-05-22 20:21 UTC (permalink / raw)
  To: mm-commits; +Cc: arjan, arjan, czoccolo, frank.rowand


The patch titled
     cpuidle-add-a-repeating-pattern-detector-to-the-menu-governor-fix
has been added to the -mm tree.  Its filename is
     cpuidle-add-a-repeating-pattern-detector-to-the-menu-governor-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: cpuidle-add-a-repeating-pattern-detector-to-the-menu-governor-fix
From: Arjan van de Ven <arjan@infradead.org>

Frank Rowand found a bug in the new pattern detector code where
the average value was looked at before the sum of values got divided
by the number of samples.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Corrado Zoccolo <czoccolo@gmail.com>
Cc: Frank Rowand <frank.rowand@am.sony.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/cpuidle/governors/menu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/cpuidle/governors/menu.c~cpuidle-add-a-repeating-pattern-detector-to-the-menu-governor-fix drivers/cpuidle/governors/menu.c
--- a/drivers/cpuidle/governors/menu.c~cpuidle-add-a-repeating-pattern-detector-to-the-menu-governor-fix
+++ a/drivers/cpuidle/governors/menu.c
@@ -205,12 +205,12 @@ static void detect_repeating_patterns(st
 	/* first calculate average and standard deviation of the past */
 	for (i = 0; i < INTERVALS; i++)
 		avg += data->intervals[i];
+	avg = avg / INTERVALS;
 
 	/* if the avg is beyond the known next tick, it's worthless */
 	if (avg > data->expected_us)
 		return;
 
-	avg = avg / INTERVALS;
 	for (i = 0; i < INTERVALS; i++)
 		stddev += (data->intervals[i] - avg) *
 			  (data->intervals[i] - avg);
_

Patches currently in -mm which might be from arjan@infradead.org are

origin.patch
linux-next.patch
timer-add-on-stack-deferrable-timer-interfaces.patch
x86-platform-driver-intelligent-power-sharing-driver.patch
cpuidle-add-a-repeating-pattern-detector-to-the-menu-governor-fix.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-22 23:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 20:21 + cpuidle-add-a-repeating-pattern-detector-to-the-menu-governor-fix.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox