]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: rename worker_pool->assoc_mutex to ->manager_mutex
authorTejun Heo <tj@kernel.org>
Thu, 14 Mar 2013 02:47:39 +0000 (19:47 -0700)
committerTejun Heo <tj@kernel.org>
Thu, 14 Mar 2013 02:47:39 +0000 (19:47 -0700)
commitc158e771ed9520085970aae4b50002b64c085ea2
tree0436a0916d33ef4b8a9acdaca0584f0a8f935327
parentabb1555ebf1ea735f23b0fe26e4fecb596071e1f
workqueue: rename worker_pool->assoc_mutex to ->manager_mutex

Manager operations are currently governed by two mutexes -
pool->manager_arb and ->assoc_mutex.  The former is used to decide who
gets to be the manager and the latter to exclude the actual manager
operations including creation and destruction of workers.  Anyone who
grabs ->manager_arb must perform manager role; otherwise, the pool
might stall.

Grabbing ->assoc_mutex blocks everyone else from performing manager
operations but doesn't require the holder to perform manager duties as
it's merely blocking manager operations without becoming the manager.

Because the blocking was necessary when [dis]associating per-cpu
workqueues during CPU hotplug events, the latter was named
assoc_mutex.  The mutex is scheduled to be used for other purposes, so
this patch gives it a more fitting generic name - manager_mutex - and
updates / adds comments to explain synchronization around the manager
role and operations.

This patch is pure rename / doc update.

Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c