The patch titled
     Fix timer_stats printout of events/sec
has been added to the -mm tree.  Its filename is
     fix-timer_stats-printout-of-events-sec.patch

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

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Fix timer_stats printout of events/sec
From: Anton Blanchard <[EMAIL PROTECTED]>

When using /proc/timer_stats on ppc64 I noticed the events/sec field wasnt
accurate.  Sometimes the integer part was incorrect due to rounding (we
werent taking the fractional seconds into consideration).

The fraction part is also wrong, we need to pad the printf statement and
take the bottom three digits of 1000 times the value.

Signed-off-by: Anton Blanchard <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---


diff -puN kernel/time/timer_stats.c~fix-timer_stats-printout-of-events-sec 
kernel/time/timer_stats.c
--- a/kernel/time/timer_stats.c~fix-timer_stats-printout-of-events-sec
+++ a/kernel/time/timer_stats.c
@@ -327,8 +327,9 @@ static int tstats_show(struct seq_file *
                ms = 1;
 
        if (events && period.tv_sec)
-               seq_printf(m, "%ld total events, %ld.%ld events/sec\n", events,
-                          events / period.tv_sec, events * 1000 / ms);
+               seq_printf(m, "%ld total events, %ld.%03ld events/sec\n",
+                          events, events * 1000 / ms,
+                          (events * 1000000 / ms) % 1000);
        else
                seq_printf(m, "%ld total events\n", events);
 
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

origin.patch
fix-timer_stats-printout-of-events-sec.patch
git-infiniband.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to