Commits
Marat Stanichenko authored and Pavel Emelyanov committed 089c01a6503
CPT: restart local_kernel_thread in case of -ERESTARTNOINTR This is essential in case of migration to SLM node. We can bump into situation when SLM refuses to fork during the undumping process because it thinks that subgroup's resources are to be redistributed. When this happens fork is delayed with the -ERESTARTNOINTR error and the undumping process fails. As Den (den@) noticed userspace is not intented to see the -ERESTARTNOINTR error so we should handle this situation in the kernel. According to the logic in the do_signal() function the interrupted system call is immediately restarted in case of the -ERESTARTNOINTR error. We borrow this policy and apply it to the local_kernel_thread() cpt helper function. [ xemul: this is quite a rare case, so simple cond_resched() is OK here all the more so the redistribution should happen in a timer ] Bug #116787 Signed-off-by: Pavel Emelyanov <xemul@openvz.org>