On Tue, Apr 25, 2017 at 05:39:37PM +0200, Peter Zijlstra wrote:
> On Tue, Apr 25, 2017 at 05:27:03PM +0200, Peter Zijlstra wrote:

> > Ah! the asymmetric setup, where @sibling is entirely uninitialized for
> > the top domain.

Like so then...

--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -509,6 +509,11 @@ static void build_group_mask(struct sche
        for_each_cpu(i, sg_span) {
                sibling = *per_cpu_ptr(sdd->sd, i);
 
+               /*
+                * Can happen in the asymmetric case, where these siblings are
+                * unused. The mask will not be empty because those CPUs that
+                * do have the top domain _should_ span the domain.
+                */
                if (!sibling->child)
                        continue;
 
@@ -518,6 +523,9 @@ static void build_group_mask(struct sche
 
                cpumask_set_cpu(i, sched_group_mask(sg));
        }
+
+       /* We must not have empty masks here */
+       WARN_ON_ONCE(cpumask_empty(sched_group_mask(sg)));
 }
 
 /*

Reply via email to