]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cgroup: make css_set_rwsem a spinlock and rename it to css_set_lock
authorTejun Heo <tj@kernel.org>
Thu, 15 Oct 2015 20:41:53 +0000 (16:41 -0400)
committerTejun Heo <tj@kernel.org>
Thu, 15 Oct 2015 20:41:53 +0000 (16:41 -0400)
commitf0d9a5f175753a371bc7fdff0d584a8d9cd72bb0
tree07f061cbc4fc5542a6441253d09e2b58310a06f9
parented27b9f7a17ddfbc007e16d4d11f33dff4fc2de7
cgroup: make css_set_rwsem a spinlock and rename it to css_set_lock

css_set_rwsem is the inner lock protecting css_sets and is accessed
from hot paths such as fork and exit.  Internally, it has no reason to
be a rwsem or even mutex.  There are no internal blocking operations
while holding it.  This was rwsem because css task iteration used to
expose it to external iterator users.  As the previous patch updated
css task iteration such that the locking is not leaked to its users,
there's no reason to keep it a rwsem.

This patch converts css_set_rwsem to a spinlock and rename it to
css_set_lock.  It uses bh-safe operations as a planned usage needs to
access it from RCU callback context.

Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup.h
kernel/cgroup.c