aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2014-06-04 16:12:19 -0700
committerLinus Torvalds <[email protected]>2014-06-04 16:54:21 -0700
commit34a1b7236ad6113883f6c448d1da854cad60265e (patch)
treeb49f5cb08f355563a679766f67cf318d427737b3 /lib/mpi
parent7b0b73d76651e5f88c88b76efa18d719f832bf6f (diff)
kthreads: kill CLONE_KERNEL, change kernel_thread(kernel_init) to avoid CLONE_SIGHAND
1. Remove CLONE_KERNEL, it has no users and it is dangerous. The (old) comment says "List of flags we want to share for kernel threads" but this is not true, we do not want to share ->sighand by default. This flag can only be used if the caller is sure that both parent/child will never play with signals (say, allow_signal/etc). 2. Change rest_init() to clone kernel_init() without CLONE_SIGHAND. In this case CLONE_SIGHAND does not really hurt, and it looks like optimization because copy_sighand() can avoid kmem_cache_alloc(). But in fact this only adds the minor pessimization. kernel_init() is going to exec the init process, and de_thread() will need to unshare ->sighand and do kmem_cache_alloc(sighand_cachep) anyway, but it needs to do more work and take tasklist_lock and siglock. Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Acked-by: Steven Rostedt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi')
0 files changed, 0 insertions, 0 deletions