summaryrefslogtreecommitdiff
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2026-09-10 07:54:13 -0700
committerTejun Heo <tj@kernel.org>2026-09-10 11:54:04 -1000
commitd8c2ce77cd09077ec57c4bed5678f76425157ccd (patch)
tree7ea48662704eb2f5b653b45847ed509618528741 /include/linux/workqueue.h
parent27db9dd7f84f3a7704596455b508611da3d6269d (diff)
downloadlinux-next-d8c2ce77cd09077ec57c4bed5678f76425157ccd.tar.gz
linux-next-d8c2ce77cd09077ec57c4bed5678f76425157ccd.zip
workqueue: Derive the standard attrs from the workqueue flags
alloc_and_link_pwqs() picks one of three static attrs arrays indexed by WQ_HIGHPRI, and branches to a separate apply_workqueue_attrs_locked() call for percpu, ordered and unbound workqueues. The arrays differ only in the nice level and the ordered bit, which the flags already say. Build the attrs from the flags instead. alloc_wq_std_attrs() sets nice for WQ_HIGHPRI and ordered for __WQ_ORDERED, which collapses the three branches into one call and drops the three arrays along with their workqueue_init_early() loop. The ordering WARN now sits behind its own __WQ_ORDERED test rather than the unbound branch. __WQ_ORDERED is internal and every macro that sets it pairs it with WQ_UNBOUND, so the WARN covers the same workqueues as before. The attrs are allocated per creation now. apply_wqattrs_prepare() already allocates one on the same path, including in workqueue_init_early(), so that is not a new constraint, and it only copies what it is given, so the caller can free them once apply_workqueue_attrs_locked() returns. Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions