diff options
| author | Breno Leitao <leitao@debian.org> | 2026-04-01 06:03:54 -0700 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-04-01 10:24:18 -1000 |
| commit | 4cdc8a7389d5025051f6c4a60fb5b7cb9b7960bb (patch) | |
| tree | dcee26f8e889938035647332713f081aa4e9d418 /include/linux/workqueue.h | |
| parent | 5920d046f7ae3bf9cf51b9d915c1fff13d299d84 (diff) | |
workqueue: set WQ_AFFN_CACHE_SHARD as the default affinity scope
Set WQ_AFFN_CACHE_SHARD as the default affinity scope for unbound
workqueues. On systems where many CPUs share one LLC, the previous
default (WQ_AFFN_CACHE) collapses all CPUs to a single worker pool,
causing heavy spinlock contention on pool->lock.
WQ_AFFN_CACHE_SHARD subdivides each LLC into smaller groups, providing
a better balance between locality and contention. Users can revert to
the previous behavior with workqueue.default_affinity_scope=cache.
On systems with 8 or fewer cores per LLC, CACHE_SHARD produces a single
shard covering the entire LLC, making it functionally identical to the
previous CACHE default. The sharding only activates when an LLC has more
than 8 cores.
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions
