[lkml]   [2012]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/4] CPU hotplug, cpusets: Fix CPU online handling related to cpusets
On Fri, Feb 10, 2012 at 04:52:07PM +0100, Peter Zijlstra wrote:
> On Thu, 2012-02-09 at 16:11 +0100, Ingo Molnar wrote:
> > > My understanding of the code is that when a CPU is taken
> > > offline, it is removed from all the cpusets and then the
> > > scan_for_empty_cpusets() function is run to move tasks from
> > > empty cpusets to their parent cpusets.
> >
> > Why is that done that way? offlining a CPU should be an
> > invariant as far as cpusets are concerned.
> Can't, tasks need to run someplace. There's two choices, add a still
> online cpu to the now empty cpuset or move the tasks to a parent that
> still has online cpus.
> Both are destructive.

OK, I will ask the stupid question... Hey, somebody has to! ;-)

Would it make sense for offlining the last CPU in a cpuset to be
destructive, but to allow offlining of a non-last CPU to be reversible?

For example, assume that cpuset A has CPUs 0 and 1, and cpuset B has
1, 2, and 3. Then offlining any single CPU and then onlining it would
restore the cpusets to their original state. Offlining both CPUs 0 and 1
would be destructive to cpuset A, so that onlining those two CPUs would
leave any tasks in cpuset A in some ancestor of cpuset A, and would
leave cpuset A with no assigned CPUs. However, that same operation
(offlining both CPUs 0 and 1, then onlining them) would restore cpuset
B to its original state, covering CPUs 1, 2, and 3.

/me ducks. ;-)

Thanx, Paul

 \ /
  Last update: 2012-02-10 17:57    [W:0.083 / U:6.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site