Re: [PATCH] cpuset: allow empty cpu/node masks

From: Konstantin Khlebnikov
Date: Tue Apr 19 2011 - 07:08:26 EST


Paul Menage wrote:
On Tue, Apr 19, 2011 at 12:07 PM, Konstantin Khlebnikov
<khlebnikov@xxxxxxxxxx> wrote:

This aimed to fix attaching tasks to the newly created cgroups in hierarchies with
cpuset subsystem. Cpuset always require initializing cpuset.cpus and cpuset.mems,
because they are empty by default, this fact block task attaching with -ENOSPC.

You can set the cgroup.clone_children to 1 to get the parent masks
automatically copied into the child. So I don't think this patch is
needed.

cgroup.clone_children does not work if ns_cgroup is mounted,
but it is ok if ns_cgroup is alredy scheduled to remove soon.

However, I still think that all cgroups must have reasonable default state.
Is cgroup.clone_children=1 planned to be default?

So, I just want to make cgroup worked out of the box:

mount -t cgroup cgroup /cgroup
mkdir /cgroup/foo
echo $$ > /cgroup/foo/tasks

Initialization before tasks attaching should be optional.


Paul

--
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/