[Devel] [RFC rh7] ve: cgroups -- Allow to attach non-self into ve cgroups
Cyrill Gorcunov
gorcunov at virtuozzo.com
Tue Jun 16 09:36:00 PDT 2015
On Tue, Jun 16, 2015 at 07:25:48PM +0300, Kirill Tkhai wrote:
> >
> > May not we simply add into ve cgroup?
> >
> > .can_attach
> > ...
> > spin_lock(&task->sighand->siglock);
> > .cance_attach
> > ...
> > spin_unlock(&task->sighand->siglock);
> > .attach
> > ...
> > spin_unlock(&task->sighand->siglock);
>
> It seems sighand lock is not good for this, because cgroup_attach_task()
> iterating over all subsys:
>
> for_each_subsys(root, ss) {
> if (ss->can_attach) {
>
> so we may bumped into wrong lock order in one of them. Also this solves
> problem №1, but does not solve problem №2.
We gonna move only one task in container start time so I think
this is not critical in timing.
As to #2 -- yes, I think rcu-readlock with sync should do the trick.
Also I need to check in details what Vladimir suggested, maybe this
will work even better?
>
> Hm. How about stop_machine? It solves all of the problems. Also, it shouldn't
> worsen performance, because this action is rare.
iirc stop-machine is a big hammer :/
More information about the Devel
mailing list