В Вт, 16/06/2015 в 19:36 +0300, Cyrill Gorcunov пишет: > 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?
Maybe it better, but it allows a situation, when parent's task_ve is !ve0, and child's is ve0 for a some time. I'm afraid if there are hidden places, which may work wrong because of this. If we have any problems because of this, the solution is good. > > 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