LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bill Irwin <bill.irwin@oracle.com>
To: Simon Arlott <simon@fire.lp0.eu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	akpm@linux-foundation.org, arjan@linux.intel.com
Subject: Re: [PATCH (updated)] timer: Run calc_load halfway through each round_jiffies second
Date: Thu, 1 Mar 2007 15:10:03 -0800	[thread overview]
Message-ID: <20070301231003.GD10643@holomorphy.com> (raw)
In-Reply-To: <45E75911.3070907@simon.arlott.org.uk>

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 <simon@fire.lp0.eu>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Arjan van de Ven <arjan@linux.intel.com>

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

  parent reply	other threads:[~2007-03-01 23:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-24 15:19 round_jiffies and load average Simon Arlott
2007-03-01  9:11 ` Simon Arlott
2007-03-01 18:52   ` [PATCH] timer: Add an initial 0.5s delay to calc_load Simon Arlott
2007-03-01 22:52     ` [PATCH (updated)] timer: Run calc_load halfway through each round_jiffies second Simon Arlott
2002-01-01  3:05       ` Pavel Machek
2007-03-05 22:35         ` Simon Arlott
2007-03-06 18:42           ` [PATCH (update 4)] " Simon Arlott
2007-03-06 22:20         ` [PATCH (updated)] " Chuck Ebbert
2007-03-01 23:10       ` Bill Irwin [this message]
2007-03-02 10:15         ` [PATCH (update 2)] " Simon Arlott
2007-03-02 15:15           ` [PATCH (update 3)] " Simon Arlott
2007-03-02 16:35             ` Eric Dumazet
2007-03-02 17:32               ` Simon Arlott
2007-03-02 18:03                 ` Eric Dumazet
2007-03-02 20:14                   ` Simon Arlott
2007-03-02 22:32                     ` Eric Dumazet
2007-03-02 23:54                       ` Simon Arlott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070301231003.GD10643@holomorphy.com \
    --to=bill.irwin@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simon@fire.lp0.eu \
    --subject='Re: [PATCH (updated)] timer: Run calc_load halfway through each round_jiffies second' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).