Skip to content

Commit bd30fe6

Browse files
committed
Merge tag 'wq-for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue updates from Tejun Heo: - Unbound workqueues now support more flexible affinity scopes. The default behavior is to soft-affine according to last level cache boundaries. A work item queued from a given LLC is executed by a worker running on the same LLC but the worker may be moved across cache boundaries as the scheduler sees fit. On machines which multiple L3 caches, which are becoming more popular along with chiplet designs, this improves cache locality while not harming work conservation too much. Unbound workqueues are now also a lot more flexible in terms of execution affinity. Differeing levels of affinity scopes are supported and both the default and per-workqueue affinity settings can be modified dynamically. This should help working around amny of sub-optimal behaviors observed recently with asymmetric ARM CPUs. This involved signficant restructuring of workqueue code. Nothing was reported yet but there's some risk of subtle regressions. Should keep an eye out. - Rescuer workers now has more identifiable comms. - workqueue.unbound_cpus added so that CPUs which can be used by workqueue can be constrained early during boot. - Now that all the in-tree users have been flushed out, trigger warning if system-wide workqueues are flushed. * tag 'wq-for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (31 commits) workqueue: fix data race with the pwq->stats[] increment workqueue: Rename rescuer kworker workqueue: Make default affinity_scope dynamically updatable workqueue: Add "Affinity Scopes and Performance" section to documentation workqueue: Implement non-strict affinity scope for unbound workqueues workqueue: Add workqueue_attrs->__pod_cpumask workqueue: Factor out need_more_worker() check and worker wake-up workqueue: Factor out work to worker assignment and collision handling workqueue: Add multiple affinity scopes and interface to select them workqueue: Modularize wq_pod_type initialization workqueue: Add tools/workqueue/wq_dump.py which prints out workqueue configuration workqueue: Generalize unbound CPU pods workqueue: Factor out clearing of workqueue-only attrs fields workqueue: Factor out actual cpumask calculation to reduce subtlety in wq_update_pod() workqueue: Initialize unbound CPU pods later in the boot workqueue: Move wq_pod_init() below workqueue_init() workqueue: Rename NUMA related names to use pod instead workqueue: Rename workqueue_attrs->no_numa to ->ordered workqueue: Make unbound workqueues to use per-cpu pool_workqueues workqueue: Call wq_update_unbound_numa() on all CPUs in NUMA node on CPU hotplug ...
2 parents 7716f38 + fe48ba7 commit bd30fe6

File tree

8 files changed

+1513
-805
lines changed

8 files changed

+1513
-805
lines changed

Diff for: Documentation/admin-guide/kernel-parameters.txt

+19-9
Original file line numberDiff line numberDiff line change
@@ -7076,6 +7076,13 @@
70767076
disables both lockup detectors. Default is 10
70777077
seconds.
70787078

7079+
workqueue.unbound_cpus=
7080+
[KNL,SMP] Specify to constrain one or some CPUs
7081+
to use in unbound workqueues.
7082+
Format: <cpu-list>
7083+
By default, all online CPUs are available for
7084+
unbound workqueues.
7085+
70797086
workqueue.watchdog_thresh=
70807087
If CONFIG_WQ_WATCHDOG is configured, workqueue can
70817088
warn stall conditions and dump internal state to
@@ -7097,15 +7104,6 @@
70977104
threshold repeatedly. They are likely good
70987105
candidates for using WQ_UNBOUND workqueues instead.
70997106

7100-
workqueue.disable_numa
7101-
By default, all work items queued to unbound
7102-
workqueues are affine to the NUMA nodes they're
7103-
issued on, which results in better behavior in
7104-
general. If NUMA affinity needs to be disabled for
7105-
whatever reason, this option can be used. Note
7106-
that this also can be controlled per-workqueue for
7107-
workqueues visible under /sys/bus/workqueue/.
7108-
71097107
workqueue.power_efficient
71107108
Per-cpu workqueues are generally preferred because
71117109
they show better performance thanks to cache
@@ -7121,6 +7119,18 @@
71217119
The default value of this parameter is determined by
71227120
the config option CONFIG_WQ_POWER_EFFICIENT_DEFAULT.
71237121

7122+
workqueue.default_affinity_scope=
7123+
Select the default affinity scope to use for unbound
7124+
workqueues. Can be one of "cpu", "smt", "cache",
7125+
"numa" and "system". Default is "cache". For more
7126+
information, see the Affinity Scopes section in
7127+
Documentation/core-api/workqueue.rst.
7128+
7129+
This can be changed after boot by writing to the
7130+
matching /sys/module/workqueue/parameters file. All
7131+
workqueues with the "default" affinity scope will be
7132+
updated accordignly.
7133+
71247134
workqueue.debug_force_rr_cpu
71257135
Workqueue used to implicitly guarantee that work
71267136
items queued without explicit CPU specified are put

0 commit comments

Comments
 (0)