]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: replace POOL_MANAGING_WORKERS flag with worker_pool->manager_arb
authorTejun Heo <tj@kernel.org>
Tue, 12 Mar 2013 18:30:00 +0000 (11:30 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 12 Mar 2013 18:30:00 +0000 (11:30 -0700)
commitbdb6a205bf5dc5be4e65cc8e6c3bca4dd4532eb1
tree546c715508dd2d4a80c754b24e41e1d4d2899775
parent159679eb64bc080b6f79e2b2ab1c82326bc74640
workqueue: replace POOL_MANAGING_WORKERS flag with worker_pool->manager_arb

POOL_MANAGING_WORKERS is used to synchronize the manager role.
Synchronizing among workers doesn't need blocking and that's why it's
implemented as a flag.

It got converted to a mutex a while back to add blocking wait from CPU
hotplug path - df9b476b6a ("workqueue: use mutex for global_cwq
manager exclusion").  Later it turned out that synchronization among
workers and cpu hotplug need to be done separately.  Eventually,
POOL_MANAGING_WORKERS is restored and workqueue->manager_mutex got
morphed into workqueue->assoc_mutex - 3dd185f5cb ("workqueue: restore
POOL_MANAGING_WORKERS") and c7b97fc5ac ("workqueue: rename
manager_mutex to assoc_mutex").

Now, we're gonna need to be able to lock out managers from
destroy_workqueue() to support multiple unbound pools with custom
attributes making it again necessary to be able to block on the
manager role.  This patch replaces POOL_MANAGING_WORKERS with
worker_pool->manager_arb.

This patch doesn't introduce any behavior changes.

v2: s/manager_mutex/manager_arb/

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