Skip to content

Commit

Permalink
sched/topology: Verify the first group matches the child domain
Browse files Browse the repository at this point in the history
We want sched_groups to be sibling child domains (or individual CPUs
when there are no child domains). Furthermore, since the first group
of a domain should include the CPU of that domain, the first group of
each domain should match the child domain.

Verify this is indeed so.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed May 15, 2017
1 parent b0151c2 commit a420b06
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/sched/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
group->sgc->capacity);
}

if (group == sd->groups && sd->child &&
!cpumask_equal(sched_domain_span(sd->child),
sched_group_cpus(group))) {
printk(KERN_ERR "ERROR: domain->groups does not match domain->child\n");
}

group = group->next;

if (group != sd->groups)
Expand Down

0 comments on commit a420b06

Please sign in to comment.