[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120211133929.GB28098@elte.hu>
Date: Sat, 11 Feb 2012 14:39:29 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
paul@...lmenage.org, rjw@...k.pl, tj@...nel.org,
frank.rowand@...sony.com, pjt@...gle.com, tglx@...utronix.de,
lizf@...fujitsu.com, prashanth@...ux.vnet.ibm.com,
paulmck@...ux.vnet.ibm.com, vatsa@...ux.vnet.ibm.com,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [PATCH 0/4] CPU hotplug, cpusets: Fix CPU online handling
related to cpusets
* Peter Zijlstra <a.p.zijlstra@...llo.nl> 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.
You aren't thinking hard enough ;-) There's several solutions
off the top of my mind:
1) refuse the "impossible" offlining of the CPU, with a clear
enough error to make it actionable
2) offer a 'forced' offlinign of a CPU that will SIGTERM all
tasks that are on the now offline CPU and can only be there.
3) offer a 'nice' offlining variant that moves all orphan tasks
to their or any other well-defined fallback CPU.
4) *allow* 'impossible' cpusets and just run them on CPU#0 or
any other natural approximation. Don't touch the cpuset!
All of these would be exception mechanisms with no need to do
anything at hot-replug time.
Thanks,
Ingo
--
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