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 :/ _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel