diff options
author | Tejun Heo <tj@kernel.org> | 2013-03-12 22:30:04 +0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-03-12 22:30:04 +0400 |
commit | c9178087acd71b4ea010ea48e147cf66952d2da9 (patch) | |
tree | 0b226a810036ee110d0f894c821df50df64db29b /include | |
parent | 75ccf5950f828d53aebfd3a852283a00abf2c5bf (diff) | |
download | linux-c9178087acd71b4ea010ea48e147cf66952d2da9.tar.xz |
workqueue: perform non-reentrancy test when queueing to unbound workqueues too
Because per-cpu workqueues have multiple pwqs (pool_workqueues) to
serve the CPUs, to guarantee that a single work item isn't queued on
one pwq while still executing another, __queue_work() takes a look at
the previous pool the target work item was on and if it's still
executing there, queue the work item on that pool.
To support changing workqueue_attrs on the fly, unbound workqueues too
will have multiple pwqs and thus need non-reentrancy test when
queueing. This patch modifies __queue_work() such that the reentrancy
test is performed regardless of the workqueue type.
per_cpu_ptr(wq->cpu_pwqs, cpu) used to be used to determine the
matching pwq for the last pool. This can't be used for unbound
workqueues and is replaced with worker->current_pwq which also happens
to be simpler.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions