Re: [tip: sched/urgent] sched/fair: Use sched_domain_span() for topology_span_sane()

From: K Prateek Nayak
Date: Sun Jul 06 2025 - 23:26:24 EST


Hello Boris,

On 7/4/2025 6:03 PM, Borislav Petkov wrote:
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 0e46068acb0a..cce540fe36c6 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -2423,6 +2423,14 @@ static bool topology_span_sane(const struct cpumask *cpu_map)
struct cpumask *sd_span = sched_domain_span(sd);
int id;
+ /*
+ * If the child already covers the cpumap, sd
+ * remains un-initialized. Use sd->private to
+ * detect uninitialized domains.
+ */
+ if (!sd->private)
+ continue;
+
/* lowest bit set in this mask is used as a unique id */
id = cpumask_first(sd_span);
---

Yeah, when you send a hunk I should apply, no matter how easy it is, pls send
it from a mail client which doesn't mangle the diff otherwise I get:

$ test-apply.sh -n /tmp/diff
checking file kernel/sched/topology.c
Hunk #1 FAILED at 2423.
1 out of 1 hunk FAILED

Or you can attach it.

I've done it by hand now.

Thank you for the testing and sorry about the malformed diff! I'll
double (and triple) check next time before sending. Thanks a ton for
applying it manually.

--
Thanks and Regards,
Prateek