]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: revert ss_id_lock to spinlock
authorHugh Dickins <hughd@google.com>
Wed, 21 Mar 2012 23:34:21 +0000 (16:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 22 Mar 2012 00:55:01 +0000 (17:55 -0700)
commitf6a97a07882c48f8b5980ef5476b91c01f2b45f0
treed014b2b5c7aa9d1a1f13686fa06699f9f734ee1c
parent0026db3ad25641b19426dd3dd66383a6ee769f72
cgroup: revert ss_id_lock to spinlock

Commit df0cb36ac530 ("memcg: replace ss->id_lock with a rwlock") has now
been seen to cause the unfair behavior we should have expected from
converting a spinlock to an rwlock: softlockup in cgroup_mkdir(), whose
get_new_cssid() is waiting for the wlock, while there are 19 tasks using
the rlock in css_get_next() to get on with their memcg workload (in an
artificial test, admittedly).  Yet lib/idr.c was made suitable for RCU
way back: revert that commit, restoring ss->id_lock to a spinlock.

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/cgroup.h
kernel/cgroup.c