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>
This commit is contained in:
Tejun Heo
2023-08-07 15:57:25 -10:00
parent 7dbf15c5c0
commit 523a301e66
4 changed files with 52 additions and 13 deletions
+1 -2
View File
@@ -126,6 +126,7 @@ struct rcu_work {
};
enum wq_affn_scope {
WQ_AFFN_DFL, /* use system default */
WQ_AFFN_CPU, /* one pod per CPU */
WQ_AFFN_SMT, /* one pod poer SMT */
WQ_AFFN_CACHE, /* one pod per LLC */
@@ -133,8 +134,6 @@ enum wq_affn_scope {
WQ_AFFN_SYSTEM, /* one pod across the whole system */
WQ_AFFN_NR_TYPES,
WQ_AFFN_DFL = WQ_AFFN_CACHE,
};
/**