[Devel] Re: cgroup attach/fork hooks consistency with the ns_cgroup

Paul Menage menage at google.com
Thu Jun 18 11:41:56 PDT 2009


On Thu, Jun 18, 2009 at 11:36 AM, Daniel Lezcano<daniel.lezcano at free.fr> wrote:
>
> There isn't a rule saying that we will inherit the values set by the parent
> ? If it is case, maybe we can remove the ns_cgroup and fix the cpuset at the
> same time, no ?

There's no rule either way, but there is the backward-compatibility
aspects of cpusets.

One way around that would be to add a "cgroup.clone_children" control
file - if you write 1 to it (it defaults to 0) then all mkdir
operations do a clone (i.e. pre-populate the child with appropriate
defaults even if that's not the normal behaviour for the subsystem.
That would avoid compatibility issues.

> Maybe, we can first fix the ns_cgroup hook problem by moving the
> ns_cgroup_clone after cgroup_fork_callbacks

 You mean fork the task into the parent cgroup, then clone the new
cgroup and reattach to the new cgroup? That could work, although I'm
not sure whether it would be bad to have the new task briefly
appearing in the parent cgroups.

Paul
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list