linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Francesco Poli <invernomuto@paranoici.org>
To: linux-kernel@vger.kernel.org
Subject: Re: Question about sched_prio_to_weight values
Date: Fri, 11 Oct 2019 00:51:03 +0200	[thread overview]
Message-ID: <20191011005103.88df00d60d3f99d66a9d558f@paranoici.org> (raw)
In-Reply-To: <21c11aca-e531-7d72-9a70-f52c12d5d408@arm.com>

[-- Attachment #1: Type: text/plain, Size: 1732 bytes --]

On Thu, 10 Oct 2019 18:28:36 +0100 Valentin Schneider wrote:

> On 07/10/2019 21:41, Francesco Poli wrote:
> > The differences are probably due to the different precision
> > of the computations: I don't know the precision of those originally
> > carried out by Ingo Molnar (single precision? double?), but calc(1)
> > is an arbitrary precision calculator and, by default, performs
> > calculations with epsilon = 1e-20 !
> > 
> > Please note that, except for the first one, all the differing
> > values obtained with the calc(1) script have slightly better
> > errors than the ones found in kernel/sched/core.c ...
> > 
> 
> As always patches are welcome, but I don't know how much there is to gain
> from a tiny error correction in those factors.

I can of course prepare a patch (a trivial adjustment of some of those
numbers), if there's interest about it, but I'll leave to you kernel
hackers to decide whether the modification may be worth doing (I am no
scheduler expert, I don't even know exactly how to test the scheduler
and assess whether a given patch is beneficial or not)...

> 
> Out of curiosity, what led you to stare at those numbers?

While reading a chapter of a book on operating systems, I encountered
the nice-level-to-weight mapping, as defined in the CFS: I became
obsessively curious and wanted by any means to understand how those
numbers were decided. That's why I was trying to reproduce them with
some criterion which could make sense.


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2019-10-10 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-06 22:32 Question about sched_prio_to_weight values Francesco Poli
2019-10-07  9:13 ` Valentin Schneider
2019-10-07 20:41   ` Francesco Poli
2019-10-10 17:28     ` Valentin Schneider
2019-10-10 22:51       ` Francesco Poli [this message]

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=20191011005103.88df00d60d3f99d66a9d558f@paranoici.org \
    --to=invernomuto@paranoici.org \
    --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;
as well as URLs for NNTP newsgroup(s).