public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Stephan Bärwolf" <stephan.baerwolf@tu-ilmenau.de>
Cc: linux-kernel@vger.kernel.org, Nikhil Rao <ncrao@google.com>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: sched: fix/optimise some issues
Date: Thu, 21 Jul 2011 18:43:28 +0200	[thread overview]
Message-ID: <1311266608.29152.170.camel@twins> (raw)
In-Reply-To: <4E28557A.7040704@tu-ilmenau.de>

(you seem to have lost CC's, restored them)

On Thu, 2011-07-21 at 18:36 +0200, Stephan Bärwolf wrote:
> > How horrid is the current vruntime situation?
> This is a point, which needs further discussion/observation.
> 
> When for example NICE0_LOAD is increased by 6 Bit (and I think
> "c8b281161dfa4bb5d5be63fb036ce19347b88c63" did it by 10bits
> on x86_64) the maximum timeslice (I am not quite sure if it was on
> HZ=1000) with a PRE kernel will be around 2**38.
> Adding this every ms (lets say 1024 times per sec) to min_vruntime
> might cause overflows too fast (after 2**(63-38-10)sec = 2**15sec ~ 9h).

9h should be just fine, and I think we can get down to minutes without
really breaking much. As long as the wrap period is at least twice the
duration of the period needed to service all tasks.

So what we want is the wrap to be > 2*nr_running*sched_min_granularity.

> Long story short: on x86_64 an unsigned long (timeslice) could be
> as large as the whole u64 for min_vruntime and this is dangerous.

> Of course limiting the maximum timeslice in "calc_delta_mine()" would
> help, too - but without the comfort using the whole x86_64 capabilties.
> (and mostly therefore finer priority-resolutions) 

It should be limited by HZ, that is I don't think there is a situation
where we can get a bigger real-time delta than 1s/HZ.

  parent reply	other threads:[~2011-07-21 16:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 13:42 sched: fix/optimise some issues Stephan Bärwolf
2011-07-20 19:11 ` Peter Zijlstra
2011-07-21  1:00   ` Mike Galbraith
2011-07-20 19:11 ` Peter Zijlstra
2011-07-20 19:11 ` Peter Zijlstra
2011-07-21 15:08 ` Peter Zijlstra
2011-07-21 16:36   ` Stephan Bärwolf
2011-07-21 16:32     ` Peter Zijlstra
2011-07-21 16:43     ` Peter Zijlstra [this message]
2011-07-21 16:51     ` Peter Zijlstra

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=1311266608.29152.170.camel@twins \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ncrao@google.com \
    --cc=stephan.baerwolf@tu-ilmenau.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