diff options
| author | Tejun Heo <[email protected]> | 2023-08-07 15:57:24 -1000 |
|---|---|---|
| committer | Tejun Heo <[email protected]> | 2023-08-07 15:57:24 -1000 |
| commit | 5de7a03cac14765ba22934b6fb1476456ee36bf8 (patch) | |
| tree | 6a5191860af35c35c67267e462978183346d3258 /tools/perf/scripts/python/parallel-perf.py | |
| parent | 0f36ee24cd43c67be07166ddd09866dc7a47cb4c (diff) | |
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 <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions