]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
docs: workqueue: document WQ_AFFN_CACHE_SHARD affinity scope
authorBreno Leitao <leitao@debian.org>
Wed, 1 Apr 2026 13:03:57 +0000 (06:03 -0700)
committerTejun Heo <tj@kernel.org>
Wed, 1 Apr 2026 20:24:18 +0000 (10:24 -1000)
Update kernel-parameters.txt and workqueue.rst to reflect the new
cache_shard affinity scope and the default change from cache to
cache_shard.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Documentation/admin-guide/kernel-parameters.txt
Documentation/core-api/workqueue.rst

index cb850e5290c2ba9404a4bcbeb07d89c439e287c4..2c182a3e002d71f4c7da3be491f3156b86770d67 100644 (file)
@@ -8519,7 +8519,8 @@ Kernel parameters
         workqueue.default_affinity_scope=
                        Select the default affinity scope to use for unbound
                        workqueues. Can be one of "cpu", "smt", "cache",
-                       "numa" and "system". Default is "cache". For more
+                       "cache_shard", "numa" and "system". Default is
+                       "cache_shard". For more
                        information, see the Affinity Scopes section in
                        Documentation/core-api/workqueue.rst.
 
index 165ca73e83514e1c6c9f83ae536fcd4756855ffa..411e1b28b8dec3fba7371d0cede541c37b0cb80d 100644 (file)
@@ -378,9 +378,9 @@ Affinity Scopes
 
 An unbound workqueue groups CPUs according to its affinity scope to improve
 cache locality. For example, if a workqueue is using the default affinity
-scope of "cache", it will group CPUs according to last level cache
-boundaries. A work item queued on the workqueue will be assigned to a worker
-on one of the CPUs which share the last level cache with the issuing CPU.
+scope of "cache_shard", it will group CPUs into sub-LLC shards. A work item
+queued on the workqueue will be assigned to a worker on one of the CPUs
+within the same shard as 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.
 
@@ -402,7 +402,13 @@ Workqueue currently supports the following affinity scopes.
 ``cache``
   CPUs are grouped according to cache boundaries. Which specific cache
   boundary is used is determined by the arch code. L3 is used in a lot of
-  cases. This is the default affinity scope.
+  cases.
+
+``cache_shard``
+  CPUs are grouped into sub-LLC shards of at most ``wq_cache_shard_size``
+  cores (default 8, tunable via the ``workqueue.cache_shard_size`` boot
+  parameter). Shards are always split on core (SMT group) boundaries.
+  This is the default affinity scope.
 
 ``numa``
   CPUs are grouped according to NUMA boundaries.