Revert "sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem"
This reverts commitd59cfc09c3
.d59cfc09c3
("sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem") andb5ba75b5fc
("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 <tj@kernel.org> Link: http://lkml.kernel.org/g/55F8097A.7000206@de.ibm.com Reported-by: Christian Borntraeger <borntraeger@de.ibm.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: stable@vger.kernel.org # v4.2+
This commit is contained in:
@@ -762,6 +762,18 @@ struct signal_struct {
|
||||
unsigned audit_tty_log_passwd;
|
||||
struct tty_audit_buf *tty_audit_buf;
|
||||
#endif
|
||||
#ifdef CONFIG_CGROUPS
|
||||
/*
|
||||
* group_rwsem prevents new tasks from entering the threadgroup and
|
||||
* member tasks from exiting,a more specifically, setting of
|
||||
* PF_EXITING. fork and exit paths are protected with this rwsem
|
||||
* using threadgroup_change_begin/end(). Users which require
|
||||
* threadgroup to remain stable should use threadgroup_[un]lock()
|
||||
* which also takes care of exec path. Currently, cgroup is the
|
||||
* only user.
|
||||
*/
|
||||
struct rw_semaphore group_rwsem;
|
||||
#endif
|
||||
|
||||
oom_flags_t oom_flags;
|
||||
short oom_score_adj; /* OOM kill score adjustment */
|
||||
|
Reference in New Issue
Block a user