]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: Replace pool->attach_mutex with global wq_pool_attach_mutex
authorTejun Heo <tj@kernel.org>
Fri, 18 May 2018 15:47:13 +0000 (08:47 -0700)
committerTejun Heo <tj@kernel.org>
Fri, 18 May 2018 15:47:13 +0000 (08:47 -0700)
commitfb6ce5163e9c1a9dc45a03512bc798d658dc9a02
treea22e88223f74e440eba499580e46533cf19d051d
parent31728fe36ea2e86fd173b0a980e94c8fad96b091
workqueue: Replace pool->attach_mutex with global wq_pool_attach_mutex

To improve workqueue visibility, we want to be able to access
workqueue information from worker tasks.  The per-pool attach mutex
makes that difficult because there's no way of stabilizing task ->
worker pool association without knowing the pool first.

Worker attach/detach is a slow path and there's no need for different
pools to be able to perform them concurrently.  This patch replaces
the per-pool attach_mutex with global wq_pool_attach_mutex to prepare
for visibility improvement changes.

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