[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Oct 2013 00:34:41 +0530
From: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To: Oleg Nesterov <oleg@...hat.com>
CC: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>,
Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Thomas Gleixner <tglx@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/6] Optimize the cpu hotplug locking -v2
On 10/10/2013 10:24 PM, Oleg Nesterov wrote:
> On 10/10, Andrew Morton wrote:
>>
>> On Thu, 10 Oct 2013 17:26:12 +0200 Oleg Nesterov <oleg@...hat.com> wrote:
>>
>>> On 10/10, Ingo Molnar wrote:
>>>>
>>>> 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,
>
> And Srivatsa wants to remove it from cpu_down().
>
Yes, I have worked on several designs to remove stop_machine() from the cpu_down
path.
http://lwn.net/Articles/538819/
http://lwn.net/Articles/556727/
>> so such an approach shouldn't
>> actually worsen things (a lot) for them?
>
> this depends on what this "freezing all tasks" actually means.
> I understood it as try_to_freeze_tasks/etc, looks too heavy...
>
> But my only point was, I am not sure we can assume that cpu_down/up
> is extremly rare and its cost does not matter.
>
>> use stop_machine() on the add/remove
>> (ie, "writer") side and nothing at all on the "reader" side. Is there
>> anything which fundamentally prevents cpu hotplug from doing the same?
>
Its certainly possible to remove stop_machine() from CPU hotplug, as I've
demonstrated in the patchsets mentioned above. And there were pretty good
performance improvements too, arising out of that change, as described here:
http://article.gmane.org/gmane.linux.ports.ppc.embedded/56122
Regards,
Srivatsa S. Bhat
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists