summaryrefslogtreecommitdiff
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2023-08-07 15:57:24 -1000
committerTejun Heo <tj@kernel.org>2023-08-07 15:57:24 -1000
commit5de7a03cac14765ba22934b6fb1476456ee36bf8 (patch)
tree6a5191860af35c35c67267e462978183346d3258 /include/linux/workqueue.h
parent0f36ee24cd43c67be07166ddd09866dc7a47cb4c (diff)
downloadlinux-5de7a03cac14765ba22934b6fb1476456ee36bf8.tar.gz
linux-5de7a03cac14765ba22934b6fb1476456ee36bf8.tar.bz2
linux-5de7a03cac14765ba22934b6fb1476456ee36bf8.zip
workqueue: Factor out clearing of workqueue-only attrs fields
workqueue_attrs can be used for both workqueues and worker_pools. However, some fields, currently only ->ordered, only apply to workqueues and should be cleared to the default / invalid values. Currently, an unbound workqueue explicitly clears attrs->ordered in get_unbound_pool() after copying the source workqueue attrs, while per-cpu workqueues rely on the fact that zeroing on allocation gives us the desired default value for pool->attrs->ordered. This is fragile. Let's add wqattrs_clear_for_pool() which clears attrs->ordered and is called from both init_worker_pool() and get_unbound_pool(). This will ease adding more workqueue-only attrs fields. In get_unbound_pool(), pool->node initialization is moved upwards for readability. This shouldn't cause any behavior changes. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions