Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754921AbbHLMiO (ORCPT ); Wed, 12 Aug 2015 08:38:14 -0400 Received: from terminus.zytor.com ([198.137.202.10]:42717 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753462AbbHLMiL (ORCPT ); Wed, 12 Aug 2015 08:38:11 -0400 Date: Wed, 12 Aug 2015 05:37:26 -0700 From: tip-bot for Aravind Gopalakrishnan Message-ID: Cc: peterz@infradead.org, Aravind.Gopalakrishnan@amd.com, efault@gmx.de, mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, hpa@zytor.com, riel@redhat.com, tglx@linutronix.de Reply-To: hpa@zytor.com, tglx@linutronix.de, riel@redhat.com, efault@gmx.de, Aravind.Gopalakrishnan@amd.com, peterz@infradead.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, mingo@kernel.org In-Reply-To: <1439256048-3748-1-git-send-email-Aravind.Gopalakrishnan@amd.com> References: <1439256048-3748-1-git-send-email-Aravind.Gopalakrishnan@amd.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/numa: Fix NUMA_DIRECT topology identification Git-Commit-ID: e237882b8f83dd1a0eece1608bcb689d4f4b221b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2204 Lines: 62 Commit-ID: e237882b8f83dd1a0eece1608bcb689d4f4b221b Gitweb: http://git.kernel.org/tip/e237882b8f83dd1a0eece1608bcb689d4f4b221b Author: Aravind Gopalakrishnan AuthorDate: Mon, 10 Aug 2015 20:20:48 -0500 Committer: Ingo Molnar CommitDate: Wed, 12 Aug 2015 12:06:08 +0200 sched/numa: Fix NUMA_DIRECT topology identification Systems which have all nodes at a distance of at most 1 hop should be identified as 'NUMA_DIRECT'. However, the scheduler incorrectly identifies it as 'NUMA_BACKPLANE'. This is because 'n' is assigned to sched_max_numa_distance but the code (mis)interprets it to mean 'number of hops'. Rik had actually used sched_domains_numa_levels for detecting a 'NUMA_DIRECT' topology: http://marc.info/?l=linux-kernel&m=141279712429834&w=2 But that was changed when he removed the hops table in the subsequent version: http://marc.info/?l=linux-kernel&m=141353106106771&w=2 Fixing the issue here. Signed-off-by: Aravind Gopalakrishnan Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Rik van Riel Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1439256048-3748-1-git-send-email-Aravind.Gopalakrishnan@amd.com Signed-off-by: Ingo Molnar --- kernel/sched/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b11f624..ea6d743 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6444,8 +6444,10 @@ static void init_numa_topology_type(void) n = sched_max_numa_distance; - if (n <= 1) + if (sched_domains_numa_levels <= 1) { sched_numa_topology_type = NUMA_DIRECT; + return; + } for_each_online_node(a) { for_each_online_node(b) { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/