diff options
author | Tejun Heo <tj@kernel.org> | 2023-08-08 03:57:25 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2023-08-08 03:57:25 +0200 |
commit | 523a301e66afd1ea9856660bcf3cee3a7c84c6dd (patch) | |
tree | 56cfc70a2006d4441b420b0fa539a40694ff0c86 /Documentation/core-api | |
parent | workqueue: Add "Affinity Scopes and Performance" section to documentation (diff) | |
download | linux-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/core-api')
-rw-r--r-- | Documentation/core-api/workqueue.rst | 9 |
1 files changed, 8 insertions, 1 deletions
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 |