Don't do load-average calculations at even 5-second intervals
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 7 Oct 2007 23:17:38 +0000 (16:17 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 7 Oct 2007 23:23:13 +0000 (16:23 -0700)
commit0c2043abefacac97b6d01129c1123a466c95b7c1
treee1b7bfd3222250fddabec15fc41fd1d2b5eb83dd
parent70cb97935b8859f27296772885104b599f560576
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 <anders@bostrom.dyndns.org>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/sched.h