path: root/kernel/fork.c
diff options
authorTejun Heo <>2015-09-16 11:51:12 -0400
committerTejun Heo <>2015-09-16 11:51:12 -0400
commit0c986253b939cc14c69d4adbe2b4121bdf4aa220 (patch)
tree78c28e9ff07b67baf4c06f72f92bbaa586452c9a /kernel/fork.c
parentf9f9e7b776142fb1c0782cade004cc8e0147a199 (diff)
Revert "sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem"
This reverts commit d59cfc09c32a2ae31f1c3bc2983a0cd79afb3f14. d59cfc09c32a ("sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem") and b5ba75b5fc0e ("cgroup: simplify threadgroup locking") changed how cgroup synchronizes against task fork and exits so that it uses global percpu_rwsem instead of per-process rwsem; unfortunately, the write [un]lock paths of percpu_rwsem always involve synchronize_rcu_expedited() which turned out to be too expensive. Improvements for percpu_rwsem are scheduled to be merged in the coming v4.4-rc1 merge window which alleviates this issue. For now, revert the two commits to restore per-process rwsem. They will be re-applied for the v4.4-rc1 merge window. Signed-off-by: Tejun Heo <> Link: Reported-by: Christian Borntraeger <> Cc: Oleg Nesterov <> Cc: "Paul E. McKenney" <> Cc: Peter Zijlstra <> Cc: Paolo Bonzini <> Cc: # v4.2+
Diffstat (limited to 'kernel/fork.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 7d5f0f118a63..2845623fb582 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1149,6 +1149,10 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
+ init_rwsem(&sig->group_rwsem);
sig->oom_score_adj = current->signal->oom_score_adj;
sig->oom_score_adj_min = current->signal->oom_score_adj_min;