public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Mau <mau@oscar.ping.de>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Patrick Mau <mau@oscar.ping.de>
Subject: Re: Workaround for wrapping loadaverage
Date: Mon, 8 Nov 2004 11:25:53 +0100	[thread overview]
Message-ID: <20041108102553.GA31980@oscar.prima.de> (raw)
In-Reply-To: <20041108012707.1e141772.akpm@osdl.org>

On Mon, Nov 08, 2004 at 01:27:07AM -0800, Andrew Morton wrote:
> Patrick Mau <mau@oscar.ping.de> wrote:
> >
> >  We can only account for 1024 runnable processes, since we have 22 bits
> >  precision, I would like to suggest a patch to calc_load in kernel/timer.c
> 
> It's better than wrapping to zero...
> 
> Why do we need 11 bits after the binary point?

I tried various other combinations, the most interesting alternative was
8 bits precision. The exponential values would be:

1 / e (5/60) * 256
235.53

1 / e (5/300) * 256
251.76

1 / e (5/900) * 256
254.58

If you would use 236, 252 and 255 the last to load calculations would
get optimized into register shifts during calculation. The precision
would be bad, but I personally don't mind loosing the fraction.

Best regards,
Patrick

  reply	other threads:[~2004-11-08 10:25 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 [this message]
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
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=20041108102553.GA31980@oscar.prima.de \
    --to=mau@oscar.ping.de \
    --cc=linux-kernel@vger.kernel.org \
    /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