Commit:     0c2043abefacac97b6d01129c1123a466c95b7c1
Parent:     70cb97935b8859f27296772885104b599f560576
Author:     Linus Torvalds <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 7 16:17:38 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Oct 7 16:23:13 2007 -0700

    Don't do load-average calculations at even 5-second intervals
    It turns out that there are a few other five-second timers in the
    kernel, and if the timers get in sync, the load-average can get
    artificially inflated by events that just happen to coincide.
    So just offset the load average calculation it by a timer tick.
    Noticed by Anders Boström, for whom the coincidence started triggering
    on one of his machines with the JBD jiffies rounding code (JBD is one of
    the subsystems that also end up using a 5-second timer by default).
    Tested-by: Anders Boström <[EMAIL PROTECTED]>
    Cc: Chuck Ebbert <[EMAIL PROTECTED]>
    Cc: Arjan van de Ven <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 include/linux/sched.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index a01ac6d..313c6b6 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -113,7 +113,7 @@ extern unsigned long avenrun[];             /* Load 
averages */
 #define FSHIFT         11              /* nr of bits of precision */
 #define FIXED_1                (1<<FSHIFT)     /* 1.0 as fixed-point */
-#define LOAD_FREQ      (5*HZ)          /* 5 sec intervals */
+#define LOAD_FREQ      (5*HZ+1)        /* 5 sec intervals */
 #define EXP_1          1884            /* 1/exp(5sec/1min) as fixed-point */
 #define EXP_5          2014            /* 1/exp(5sec/5min) */
 #define EXP_15         2037            /* 1/exp(5sec/15min) */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to