cgroup: status-quo and userland efforts
lizefan at huawei.com
Wed Apr 17 01:29:32 UTC 2013
On 2013/4/17 1:10, Tejun Heo wrote:
> Hello, Li.
> On Tue, Apr 16, 2013 at 07:17:17PM +0800, Li Zefan wrote:
>>> hot-unplug). It currently transfers all its tasks to the nearest
>>> ancestor with executing resources, which is an irreversible process
>>> which would affect all other co-mounted controllers. We probably want
>>> it to just take on the masks of the ancestor until its own executing
>>> resources become online again, and the new behavior should be gated
>>> behind a switch (Li, can you please look into this?).
>> Sure, I'll be working on sane hierarchy behavior for cpuset.
> Great, it'd be great if you can share how it's gonna be done once the
> basic design gets settled before full implementation.
The basic idea is, when a cpuset becomes empty due to hotplug, we don't
move the tasks in it, but instead we update tasks' cpumask/nodemask using
the nearest non-empty acestor cpuset's cpus_allowed and mems_allowed.
- then it's allowed to move those tasks from the empty cpuset to another
- when this acestor cpuset's cpumask/nodemask is changed (either by writing
cpuset.cpus/mems or hotplug), not only the tasks in it but also tasks in
the empty cpuset will be updated.
- it's allowed to move a task to an empty cpuset, and the task's cpumask/nodemask
will be updated according to the nearst non-empty acestor, no matter if this
empty cpuset is exclusive or not.
- if a previously offlined cpu becomes online again, the emtpy cpuset won't
get this cpu resource automatically, which is the current behavior.
How does this sound?
More information about the Containers