All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Holger.Wolf@de.ibm.com, epasch@de.ibm.com
Subject: Missing recalculation of scheduler tunables in case of cpu hot add/remove
Date: Thu, 26 Nov 2009 17:10:54 +0100	[thread overview]
Message-ID: <4B0EA88E.3030205@linux.vnet.ibm.com> (raw)

Hi everybody,
while testing different scheduler tunables I came across the function 
sched_init_granularity which recalculates the values of 
sysctl_sched_min_granularity, sysctl_sched_latency and 
sysctl_sched_wakeup_granularity  in reference to the number of cpu's 
currently online on boot time. While someone could think the 1+ 
ilog2(num_online_cpus() factor might be wrong or suboptimal I wanted to 
avoid that discussion (at least in this thread :-)).

What I consider more important at the moment is that there is no hook to 
recalculate these values in case cpu hot add/remove takes place.
As an example someone could boot a machine with one online cpu and get 
the low non scaled defaults, later on driven by load the system 
activates more and more processors. Therefore the system could end up 
having  a large amount of cpus with non recalculated scheduler tunables.

I'm looking forward to all other solutions approaches that will come up, 
so the following is just a suggestion.
We might store the corresponding 1cpu values in hidden variables and 
rescale the effective ones on every cpu add/remove.
Additionally there would be the need for some logic to update the 
corresponding 1cpu values every time a user sets new values via the proc 
interface.
I already thought about potential rounding errors in the suggested 
solution, but those might be better than systems being factors off the 
value they should have.

-- 

Grüsse / regards, Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization 


             reply	other threads:[~2009-11-26 16:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26 16:10 Christian Ehrhardt [this message]
2009-11-26 16:19 ` Missing recalculation of scheduler tunables in case of cpu hot add/remove Peter Zijlstra
2009-11-26 16:25   ` Christian Ehrhardt
2009-11-26 16:28     ` Peter Zijlstra
2009-11-26 16:31       ` Christian Ehrhardt
2009-11-26 16:45         ` Peter Zijlstra
2009-11-26 18:39           ` Christian Ehrhardt
2009-11-26 18:53             ` Peter Zijlstra
2009-12-03  9:12           ` Pavel Machek
2009-12-03  9:31             ` Christian Ehrhardt
2009-11-26 16:22 ` 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=4B0EA88E.3030205@linux.vnet.ibm.com \
    --to=ehrhardt@linux.vnet.ibm.com \
    --cc=Holger.Wolf@de.ibm.com \
    --cc=epasch@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.