From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:55241 "EHLO outbound-smtp05.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936454AbdGTVVq (ORCPT ); Thu, 20 Jul 2017 17:21:46 -0400 Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp05.blacknight.com (Postfix) with ESMTPS id 6082D99034 for ; Thu, 20 Jul 2017 21:21:45 +0000 (UTC) From: Mel Gorman To: Linux-Stable Cc: Mel Gorman Subject: [PATCH 05/26] sched/topology: Verify the first group matches the child domain Date: Thu, 20 Jul 2017 22:21:23 +0100 Message-Id: <20170720212144.18453-6-mgorman@techsingularity.net> In-Reply-To: <20170720212144.18453-1-mgorman@techsingularity.net> References: <20170720212144.18453-1-mgorman@techsingularity.net> Sender: stable-owner@vger.kernel.org List-ID: From: Peter Zijlstra commit a420b0630362c2c451060e6187e36d72df827134 upstream. 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) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Mel Gorman --- kernel/sched/topology.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 3d50ee38b8fb..81c82031ed95 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -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) -- 2.13.1