Re: [PATCH 0/4] CPU hotplug, cpusets: Fix CPU online handlingrelated to cpusets

From: Peter Zijlstra
Date: Thu Feb 09 2012 - 11:44:55 EST


On Wed, Feb 08, 2012 at 12:03:50PM +0530, Srivatsa S. Bhat wrote:
> On 02/08/2012 08:52 AM, Peter Zijlstra wrote:
>
> > On Wed, 2012-02-08 at 00:25 +0530, Srivatsa S. Bhat wrote:
> >> There is a very long standing issue related to how cpusets handle CPU
> >> hotplug events. The problem is that when a CPU goes offline, it is removed
> >> from all cpusets. However, when that CPU comes back online, it is added
> >> *only* to the root cpuset. Which means, any task attached to a cpuset lower
> >> in the hierarchy will have one CPU less in its cpuset, though it had this
> >> CPU in its cpuset before the CPU went offline.
> >
> > Yeah so? That's known behaviour..
>
>
> This might be a known behaviour, but this is surely not the behaviour we
> want right? I understand that if you take a CPU offline, we have no other
> choice but to remove it from all cpusets. But if the same CPU comes back
> online and the userspace did not request any change to cpusets in between
> those events (offline-online), then is it not wrong to silently keep that
> CPU out of the cpuset even when it comes online?

no, it is what we want because unplug is destructive, it cannot be undone in generic. consider the case where you unplug allcpus of a set.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/