diff options
author | Tejun Heo <tj@kernel.org> | 2013-03-12 18:30:00 (GMT) |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-03-12 18:30:00 (GMT) |
commit | fa1b54e69bc6c04674c9bb96a6cfa8b2c9f44771 (patch) | |
tree | d04342a5015b1b88fdefeceabdb1f26479dcff65 /init/do_mounts.c | |
parent | 76af4d936153afec176c53378e6ba8671e7e237d (diff) | |
download | linux-fsl-qoriq-fa1b54e69bc6c04674c9bb96a6cfa8b2c9f44771.tar.xz |
workqueue: update synchronization rules on worker_pool_idr
Make worker_pool_idr protected by workqueue_lock for writes and
sched-RCU protected for reads. Lockdep assertions are added to
for_each_pool() and get_work_pool() and all their users are converted
to either hold workqueue_lock or disable preemption/irq.
worker_pool_assign_id() is updated to hold workqueue_lock when
allocating a pool ID. As idr_get_new() always performs RCU-safe
assignment, this is enough on the writer side.
As standard pools are never destroyed, there's nothing to do on that
side.
The locking is superflous at this point. This is to help
implementation of unbound pools/pwqs with custom attributes.
This patch doesn't introduce any behavior changes.
v2: Updated for_each_pwq() use if/else for the hidden assertion
statement instead of just if as suggested by Lai. This avoids
confusing the following else clause.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Diffstat (limited to 'init/do_mounts.c')
0 files changed, 0 insertions, 0 deletions