[PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods
fweisbec at gmail.com
Tue Aug 23 18:14:30 PDT 2011
On Wed, Aug 24, 2011 at 12:19:54AM +0200, Tejun Heo wrote:
> cgroup has grown quite some number of subsys methods. Some of them
> are overlapping, inconsistent with each other and called under
> different conditions depending on whether they're called for a single
> task or whole process. Unfortunately, these callbacks are complicated
> and incomplete at the same time.
> * ->attach_task() is called after migration for task attach but before
> for process.
> * Ditto for ->pre_attach().
> * ->can_attach_task() is called for every task in the thread group but
> ->attach_task() skips the ones which don't actually change cgroups.
> * Task attach becomes noop if the task isn't actually moving. Process
> attach is always performed.
> * ->attach_task() doesn't (or at least aren't supposed to) have access
> to the old cgroup.
> * During cancel, there's no way to access the affected tasks.
> This patchset introduces cgroup_taskset along with some accessors and
> iterator, updates methods to use it, consolidates usages and drops
> superflous methods.
> It contains the following six patches.
I don't understand the point on patches 3,4,5,6
Why pushing the task iterations down to the subsystems?
More information about the Containers