[lkml]   [2007]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH (updated)] timer: Run calc_load halfway through each round_jiffies second
On Thu, Mar 01, 2007 at 10:52:01PM +0000, Simon Arlott wrote:
> Whenever jiffies is started at a multiple of 5*HZ or wraps, calc_load is
> run exactly on the second which is when tasks using round_jiffies will
> be scheduled to run. This has a bad effect on the load average, making
> it tend towards 1.00 if a task happens to run every time the load is
> being calculated.
> This changes calc_load so that it updates load half a second after any
> tasks scheduled using round_jiffies.
> Signed-off-by: Simon Arlott <>
> Cc: Andrew Morton <>
> Cc: Arjan van de Ven <>

Well, it doesn't reintroduce the for_each_task() (not that it's present
in similar form) loop in count_active_tasks(), so it doesn't bother me.
You seem to have merely changed some offsets, which resolves the
round_jiffies() clash. It's easy to envision similar degenerate cases,
though I'm not sure we care enough to drop in a PRNG to handle them.

== wli
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-03-02 00:13    [W:0.125 / U:5.488 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site