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:
@@ -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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user