Skip to contentSkip to conversation

sched/topology: Covered all cpus of same node in asymmetric node setups

PATCH In review Bing Huang 2 participants 2 messages Jul 29, 2023 – Jul 31, 2023 Scheduler

lore
Share & tools
lore

Bing Huang

author
#0 lore raw

PATCH 1/1 sched/topology: Covered all cpus of same node in asymmetric node setups

in asymmetric node setups, if one cpu'sd spans is empty in some depth, others in same node do

---
 kernel/sched/topology.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/sched/topology.c +3 -1
index 7cfcfe5d27b9..8c5372ad7694 100644
@@ -1045,8 +1045,10 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
 		 * Domains should always include the CPU they're built on, so
 		 * check that.
 		 */
-		if (!cpumask_test_cpu(i, sched_domain_span(sibling)))
+		if (!cpumask_test_cpu(i, sched_domain_span(sibling))) {
+			cpumask_or(covered, covered, cpumask_of_node(cpu_to_node(i)));
 			continue;
+		}
 
 		/*
 		 * Usually we build sched_group by sibling's child sched_domain
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 2 lines · Bing Huang

in asymmetric node setups, if one cpu'sd spans is empty in some depth, others in same node do

Sorry, what?!?

Quoted 24 lines
---
 kernel/sched/topology.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/sched/topology.c +3 -1
index 7cfcfe5d27b9..8c5372ad7694 100644
@@ -1045,8 +1045,10 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
 		 * Domains should always include the CPU they're built on, so
 		 * check that.
 		 */
-		if (!cpumask_test_cpu(i, sched_domain_span(sibling)))
+		if (!cpumask_test_cpu(i, sched_domain_span(sibling))) {
+			cpumask_or(covered, covered, cpumask_of_node(cpu_to_node(i)));
 			continue;
+		}
 
 		/*
 		 * Usually we build sched_group by sibling's child sched_domain
Signature · 1 line
2.25.1