Skip to content

Commit 4efcc8b

Browse files
yu-chen-surfPeter Zijlstra
authored andcommitted
sched/topology: Align group flags when removing degenerate domain
The flags of the child of a given scheduling domain are used to initialize the flags of its scheduling groups. When the child of a scheduling domain is degenerated, the flags of its local scheduling group need to be updated to align with the flags of its new child domain. The flag SD_SHARE_CPUCAPACITY was aligned in Commit bf2dc42 ("sched/topology: Propagate SMT flags when removing degenerate domain"). Further generalize this alignment so other flags can be used later, such as in cluster-based task wakeup. [1] Reported-by: Yicong Yang <[email protected]> Suggested-by: Ricardo Neri <[email protected]> Signed-off-by: Chen Yu <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Tim Chen <[email protected]> Reviewed-by: Yicong Yang <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c2e164a commit 4efcc8b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/sched/topology.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,8 +722,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
722722

723723
if (parent->parent) {
724724
parent->parent->child = tmp;
725-
if (tmp->flags & SD_SHARE_CPUCAPACITY)
726-
parent->parent->groups->flags |= SD_SHARE_CPUCAPACITY;
725+
parent->parent->groups->flags = tmp->flags;
727726
}
728727

729728
/*

0 commit comments

Comments
 (0)