|
|
Subscribe / Log in / New account

Re: [PATCH 0/6] Optimize the cpu hotplug locking -v2

From:  Ingo Molnar <mingo-AT-kernel.org>
To:  Andrew Morton <akpm-AT-linux-foundation.org>
Subject:  Re: [PATCH 0/6] Optimize the cpu hotplug locking -v2
Date:  Thu, 10 Oct 2013 18:52:29 +0200
Message-ID:  <20131010165229.GC12998@gmail.com>
Cc:  Oleg Nesterov <oleg-AT-redhat.com>, "Srivatsa S. Bhat" <srivatsa.bhat-AT-linux.vnet.ibm.com>, Peter Zijlstra <peterz-AT-infradead.org>, Paul McKenney <paulmck-AT-linux.vnet.ibm.com>, Mel Gorman <mgorman-AT-suse.de>, Rik van Riel <riel-AT-redhat.com>, Srikar Dronamraju <srikar-AT-linux.vnet.ibm.com>, Andrea Arcangeli <aarcange-AT-redhat.com>, Johannes Weiner <hannes-AT-cmpxchg.org>, Thomas Gleixner <tglx-AT-linutronix.de>, Steven Rostedt <rostedt-AT-goodmis.org>, Linus Torvalds <torvalds-AT-linux-foundation.org>, linux-kernel-AT-vger.kernel.org
Archive‑link:  Article


* Andrew Morton <akpm@linux-foundation.org> wrote:

> On Thu, 10 Oct 2013 17:26:12 +0200 Oleg Nesterov <oleg@redhat.com> wrote:
> 
> > On 10/10, Ingo Molnar wrote:
> > >
> > > * Peter Zijlstra <peterz@infradead.org> wrote:
> > >
> > > > But the thing is; our sense of NR_CPUS has shifted, where it used to be
> > > > ok to do something like:
> > > >
> > > >   for_each_cpu()
> > > >
> > > > With preemption disabled; it gets to be less and less sane to do 
> > > > so, simply because 'common' hardware has 256+ CPUs these days. If 
> > > > we cannot rely on preempt disable to exclude hotplug, we must use 
> > > > get_online_cpus(), but get_online_cpus() is global state and thus 
> > > > cannot be used at any sort of frequency.
> > >
> > > So ... why not make it _really_ cheap, i.e. the read lock costing 
> > > nothing, and tie CPU hotplug to freezing all tasks in the system?
> > >
> > > Actual CPU hot unplugging and repluggin is _ridiculously_ rare in a 
> > > system, I don't understand how we tolerate _any_ overhead from this 
> > > utter slowpath.
> > 
> > Well, iirc Srivatsa (cc'ed) pointed out that some systems do 
> > cpu_down/up quite often to save the power.
> 
> cpu hotremove already uses stop_machine, so such an approach shouldn't 
> actually worsen things (a lot) for them?

Also, using CPU hotremove to save power, instead of implementing proper 
power aware scheduling, is very broken to begin with.

Thanks,

	Ingo



to post comments


Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds