summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2023-08-08 03:57:25 +0200
committerTejun Heo <tj@kernel.org>2023-08-08 03:57:25 +0200
commit523a301e66afd1ea9856660bcf3cee3a7c84c6dd (patch)
tree56cfc70a2006d4441b420b0fa539a40694ff0c86 /Documentation
parentworkqueue: Add "Affinity Scopes and Performance" section to documentation (diff)
downloadlinux-523a301e66afd1ea9856660bcf3cee3a7c84c6dd.tar.xz
linux-523a301e66afd1ea9856660bcf3cee3a7c84c6dd.zip
workqueue: Make default affinity_scope dynamically updatable
While workqueue.default_affinity_scope is writable, it only affects workqueues which are created afterwards and isn't very useful. Instead, let's introduce explicit "default" scope and update the effective scope dynamically when workqueue.default_affinity_scope is changed. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt8
-rw-r--r--Documentation/core-api/workqueue.rst9
2 files changed, 12 insertions, 5 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 732c5c7e3fa5..98ffce100a39 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -7014,10 +7014,10 @@
information, see the Affinity Scopes section in
Documentation/core-api/workqueue.rst.
- This can be updated after boot through the matching
- file under /sys/module/workqueue/parameters.
- However, the changed default will only apply to
- unbound workqueues created afterwards.
+ This can be changed after boot by writing to the
+ matching /sys/module/workqueue/parameters file. All
+ workqueues with the "default" affinity scope will be
+ updated accordignly.
workqueue.debug_force_rr_cpu
Workqueue used to implicitly guarantee that work
diff --git a/Documentation/core-api/workqueue.rst b/Documentation/core-api/workqueue.rst
index 4a8e764f41ae..5d7b01aed1fe 100644
--- a/Documentation/core-api/workqueue.rst
+++ b/Documentation/core-api/workqueue.rst
@@ -358,7 +358,11 @@ on one of the CPUs which share the last level cache with the issuing CPU.
Once started, the worker may or may not be allowed to move outside the scope
depending on the ``affinity_strict`` setting of the scope.
-Workqueue currently supports the following five affinity scopes.
+Workqueue currently supports the following affinity scopes.
+
+``default``
+ Use the scope in module parameter ``workqueue.default_affinity_scope``
+ which is always set to one of the scopes below.
``cpu``
CPUs are not grouped. A work item issued on one CPU is processed by a
@@ -392,6 +396,9 @@ directory.
``affinity_scope``
Read to see the current affinity scope. Write to change.
+ When default is the current scope, reading this file will also show the
+ current effective scope in parentheses, for example, ``default (cache)``.
+
``affinity_strict``
0 by default indicating that affinity scopes are not strict. When a work
item starts execution, workqueue makes a best-effort attempt to ensure