STRUCT WORKQUEUE_ATTRS(9)
π struct workqueue_attrs(9) π
okay bestie, you're in the Kernel API Manual and this is the struct workqueue_attrs(9) page β the struct for workqueue attributes, and she's lowkey carrying the whole vibe. β¨
πΈ NAME πΈ
struct workqueue_attrs β a struct for workqueue attributes. That's the name, that's the job, and she's iconic for it. π
β¨ SYNOPSIS β¨
Here's the exact shape of her, bestie:
struct workqueue_attrs {
int nice;
cpumask_var_t cpumask;
cpumask_var_t __pod_cpumask;
bool affn_strict;
enum wq_affn_scope affn_scope;
bool ordered;
};
π Members π
niceβ nice level πcpumaskβ allowed CPUs. π₯οΈ Work items in this workqueue are affine to these CPUs and not allowed to execute on other CPUs. A pool serving a workqueue must have the samecpumask.__pod_cpumaskβ internal attribute used to create per-pod pools. π«£ Internal use only. Per-pod unbound worker pools are used to improve locality. Always a subset of->cpumask. A workqueue can be associated with multiple worker pools with disjoint__pod_cpumask's. Whether the enforcement of a pool's__pod_cpumaskis strict depends onaffn_strict.affn_strictβ affinity scope is strict. π If clear, workqueue will make a best-effort attempt at starting the worker inside__pod_cpumaskbut the scheduler is free to migrate it outside. If set, workers are only allowed to run inside__pod_cpumask.affn_scopeβ unbound CPU affinity scope. π§ CPU pods are used to improve execution locality of unbound work items. There are multiple pod types, one for eachwq_affn_scope, and every CPU in the system belongs to one pod in every pod type. CPUs that belong to the same pod share the worker pool. For example, selectingWQ_AFFN_NUMAmakes the workqueue use a separate worker pool for each NUMA node. πorderedβ work items must be executed one by one in queueing order. π¦
π Description π
This can be used to change attributes of an unbound workqueue. That's the tea. β
π¦ SEE ALSO π¦
Kernel file ./include/linux/workqueue.h β plus the whole bestie squad: work_pending(9), delayed_work_pending(9), alloc_workqueue(9), devm_alloc_workqueue(9), alloc_workqueue_lockdep_map(9), alloc_ordered_workqueue_lockdep_map(9), alloc_ordered_workqueue(9), queue_work(9), queue_delayed_work(9), mod_delayed_work(9), schedule_work_on(9), schedule_work(9), enable_and_queue_work(9), schedule_delayed_work_on(9), schedule_delayed_work(9).
mwah π β this page is from ./include/linux, October 2026, and it's struct workqueue_attrs(9) signing off. Bye bestie! πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms