cgroup/cpuset: Fix incorrect top_cpuset flags
Commit8996f93fc3
("cgroup/cpuset: Statically initialize more members of top_cpuset") uses an incorrect "<" relational operator for the CS_SCHED_LOAD_BALANCE bit when initializing the top_cpuset. This results in load_balancing turned off by default in the top cpuset which is bad for performance. Fix this by using the BIT() helper macro to set the desired top_cpuset flags and avoid similar mistake from being made in the future. Fixes:8996f93fc3
("cgroup/cpuset: Statically initialize more members of top_cpuset") Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@ -368,8 +368,8 @@ static inline void notify_partition_change(struct cpuset *cs, int old_prs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct cpuset top_cpuset = {
|
static struct cpuset top_cpuset = {
|
||||||
.flags = ((1 << CS_ONLINE) | (1 << CS_CPU_EXCLUSIVE) |
|
.flags = BIT(CS_ONLINE) | BIT(CS_CPU_EXCLUSIVE) |
|
||||||
(1 << CS_MEM_EXCLUSIVE) | (1 < CS_SCHED_LOAD_BALANCE)),
|
BIT(CS_MEM_EXCLUSIVE) | BIT(CS_SCHED_LOAD_BALANCE),
|
||||||
.partition_root_state = PRS_ROOT,
|
.partition_root_state = PRS_ROOT,
|
||||||
.relax_domain_level = -1,
|
.relax_domain_level = -1,
|
||||||
.remote_sibling = LIST_HEAD_INIT(top_cpuset.remote_sibling),
|
.remote_sibling = LIST_HEAD_INIT(top_cpuset.remote_sibling),
|
||||||
|
Reference in New Issue
Block a user