Re: [PATCH v3 5/5] cpusets, suspend: Save and restore cpusets duringsuspend/resume
From: David Rientjes
Date: Tue May 15 2012 - 18:32:07 EST
On Wed, 16 May 2012, Srivatsa S. Bhat wrote:
> > I know root is special
> > cased all over the cpuset code, but I think the real fix here is to figure
> > out why it can't be left as a superset and then we end up doing nothing
> > for s/r.
> > I don't have a preference for cpu hotplug and whether cpuset.cpus = 1-3
> > remains 1-3 when cpu 2 is offlined or not, I think it could be argued both
> > ways, but I disagree with saving the cpumask, removing all suspended cpus,
> > and then reinstating it for no reason.
> I think there is a valid reason behind doing that.
> Cpusets translates to sched domains in scheduler terms. So whenever you update
> cpusets, the sched domains are updated. IOW, if you don't touch cpusets during
> hotplug (suspend/resume case), you allow them to have offline cpus, meaning,
> you allow sched domains to have offline cpus. Hence sched domains are rendered
It's not possible to update the sched domains for s/r to be a subset of
cpuset.cpus? It would be the same situation for a thread using
sched_setaffinity() while bound to a cpuset with a superset of allowed
nodes. If you do that, there's no reason to alter cpuset.cpus at all and
you don't need to carry another cpumask around for each cpuset.
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/