public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Herbert Poetzl <herbert@13thfloor.at>
Cc: Patrick Mau <mau@oscar.ping.de>, Andrew Morton <akpm@osdl.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Workaround for wrapping loadaverage
Date: Wed, 10 Nov 2004 18:07:25 +1100	[thread overview]
Message-ID: <4191BE2D.4060407@yahoo.com.au> (raw)
In-Reply-To: <20041109185103.GE29661@mail.13thfloor.at>

Herbert Poetzl wrote:
> On Tue, Nov 09, 2004 at 01:43:35AM +0100, Patrick Mau wrote:
> 

>>We re-calculate the load every 5 seconds. I think it would be OK to
>>use more bits/registers, it's not that frequently called.
> 
> 
> hmm ...
> 
> 	do_timer() -> update_times() -> calc_load()
> 
> so not exactly every 5 seconds ...
> 

calc_load() -> messing with LOAD_FREQ -> once every 5 seconds, no?

I think doing 32/32 bit calculations would be fine.

> but I agree that a higher resolution would be a good
> idea ... also doing the calculation when the number
> of running/uninterruptible processes has changed would
> be a good idea ...
> 

Apart from the problem Con pointed out, you'd need a fancier algorithm
to calculate load because your interval isn't going to be fixed, so you
need to factor that in when calculating the area under the 'curve'
(loadavg).

I think the good 'ol 5 seconds should be alright.

  parent reply	other threads:[~2004-11-10  7:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-08  0:19 Workaround for wrapping loadaverage Patrick Mau
2004-11-08  9:27 ` Andrew Morton
2004-11-08 10:25   ` Patrick Mau
2004-11-08 23:50     ` Andrew Morton
2004-11-09  0:43       ` Patrick Mau
2004-11-09 18:51         ` Herbert Poetzl
2004-11-09 21:49           ` Con Kolivas
2004-11-10  6:20             ` Herbert Poetzl
2004-11-10  9:57               ` Con Kolivas
2004-11-10  7:07           ` Nick Piggin [this message]
2004-11-10 23:31             ` Herbert Poetzl

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=4191BE2D.4060407@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=herbert@13thfloor.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mau@oscar.ping.de \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox