public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
To: linux-kernel@vger•kernel.org
Cc: Srikar Dronamraju <srikar@linux•vnet.ibm.com>,
	Rik van Riel <riel@surriel•com>,
	"Peter Zijlstra \(Intel\)" <peterz@infradead•org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
	linuxppc-dev <linuxppc-dev@lists•ozlabs.org>,
	Heiko Carstens <heiko.carstens@de•ibm.com>,
	Mel Gorman <mgorman@techsingularity•net>,
	stable@vger•kernel.org,
	Sasha Levin <alexander.levin@microsoft•com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd•com>,
	Andre Wild <wild@linux•vnet.ibm.com>,
	Thomas Gleixner <tglx@linutronix•de>,
	Linus Torvalds <torvalds@linux-foundation•org>,
	Ingo Molnar <mingo@kernel•org>
Subject: [PATCH 4.18 125/168] sched/topology: Set correct NUMA topology type
Date: Mon,  8 Oct 2018 20:31:45 +0200	[thread overview]
Message-ID: <20181008175624.800138207@linuxfoundation.org> (raw)
In-Reply-To: <20181008175620.043587728@linuxfoundation.org>

4.18-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Srikar Dronamraju <srikar@linux•vnet.ibm.com>

[ Upstream commit e5e96fafd9028b1478b165db78c52d981c14f471 ]

With the following commit:

  051f3ca02e46 ("sched/topology: Introduce NUMA identity node sched domain")

the scheduler introduced a new NUMA level. However this leads to the NUMA topology
on 2 node systems to not be marked as NUMA_DIRECT anymore.

After this commit, it gets reported as NUMA_BACKPLANE, because
sched_domains_numa_level is now 2 on 2 node systems.

Fix this by allowing setting systems that have up to 2 NUMA levels as
NUMA_DIRECT.

While here remove code that assumes that level can be 0.

Signed-off-by: Srikar Dronamraju <srikar@linux•vnet.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead•org>
Cc: Andre Wild <wild@linux•vnet.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de•ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation•org>
Cc: Mel Gorman <mgorman@techsingularity•net>
Cc: Michael Ellerman <mpe@ellerman•id.au>
Cc: Peter Zijlstra <peterz@infradead•org>
Cc: Rik van Riel <riel@surriel•com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd•com>
Cc: Thomas Gleixner <tglx@linutronix•de>
Cc: linuxppc-dev <linuxppc-dev@lists•ozlabs.org>
Fixes: 051f3ca02e46 "Introduce NUMA identity node sched domain"
Link: http://lkml.kernel.org/r/1533920419-17410-1-git-send-email-srikar@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel•org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft•com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
---
 kernel/sched/topology.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1295,7 +1295,7 @@ static void init_numa_topology_type(void
 
 	n = sched_max_numa_distance;
 
-	if (sched_domains_numa_levels <= 1) {
+	if (sched_domains_numa_levels <= 2) {
 		sched_numa_topology_type = NUMA_DIRECT;
 		return;
 	}
@@ -1380,9 +1380,6 @@ void sched_init_numa(void)
 			break;
 	}
 
-	if (!level)
-		return;
-
 	/*
 	 * 'level' contains the number of unique distances
 	 *



           reply	other threads:[~2018-10-08 18:55 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20181008175620.043587728@linuxfoundation.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181008175624.800138207@linuxfoundation.org \
    --to=gregkh@linuxfoundation$(echo .)org \
    --cc=alexander.levin@microsoft$(echo .)com \
    --cc=heiko.carstens@de$(echo .)ibm.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mgorman@techsingularity$(echo .)net \
    --cc=mingo@kernel$(echo .)org \
    --cc=peterz@infradead$(echo .)org \
    --cc=riel@surriel$(echo .)com \
    --cc=srikar@linux$(echo .)vnet.ibm.com \
    --cc=stable@vger$(echo .)kernel.org \
    --cc=suravee.suthikulpanit@amd$(echo .)com \
    --cc=tglx@linutronix$(echo .)de \
    --cc=torvalds@linux-foundation$(echo .)org \
    --cc=wild@linux$(echo .)vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox