aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-03-12 11:30:04 -0700
committerTejun Heo <tj@kernel.org>2013-03-12 11:30:04 -0700
commitc9178087acd71b4ea010ea48e147cf66952d2da9 (patch)
tree0b226a810036ee110d0f894c821df50df64db29b /include/linux
parentworkqueue: prepare flush_workqueue() for dynamic creation and destrucion of unbound pool_workqueues (diff)
downloadlinux-dev-c9178087acd71b4ea010ea48e147cf66952d2da9.tar.xz
linux-dev-c9178087acd71b4ea010ea48e147cf66952d2da9.zip
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/linux')
0 files changed, 0 insertions, 0 deletions