From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751654AbdEBOwl (ORCPT ); Tue, 2 May 2017 10:52:41 -0400 Received: from merlin.infradead.org ([205.233.59.134]:32784 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751232AbdEBOwk (ORCPT ); Tue, 2 May 2017 10:52:40 -0400 Date: Tue, 2 May 2017 16:52:24 +0200 From: Peter Zijlstra To: Rik van Riel Cc: mingo@kernel.org, lvenanci@redhat.com, lwang@redhat.com, efault@gmx.de, tglx@linutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/14] sched/topology,debug: Verify the first group matches the child domain Message-ID: <20170502145224.GC4626@worktop.programming.kicks-ass.net> References: <20170428131958.893188882@infradead.org> <20170428132502.650376062@infradead.org> <1493673206.31102.18.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1493673206.31102.18.camel@redhat.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 01, 2017 at 05:13:26PM -0400, Rik van Riel wrote: > On Fri, 2017-04-28 at 15:20 +0200, Peter Zijlstra wrote: > > Signed-off-by: Peter Zijlstra (Intel) > > This could use a changelog. Yes indeed... I put off writing one because $hard, and clearly I forgot entirely :-/ How's this? --- Subject: sched/topology,debug: Verify the first group matches the child domain From: Peter Zijlstra Date: Fri Apr 14 18:20:48 CEST 2017 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) --- kernel/sched/topology.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -93,6 +93,12 @@ static int sched_domain_debug_one(struct 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)