Subject: Patch "sched/topology: Set correct NUMA topology type" has been added to the 4.18-stable tree

From: <[email-masked]>
Date: Mon, 08 Oct 2018 17:41:03 +0200

This is a note to let you know that I've just added the patch titled

    sched/topology: Set correct NUMA topology type

to the 4.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sched-topology-set-correct-numa-topology-type.patch
and it can be found in the queue-4.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email-masked]> know about it.

>From foo@baz Mon Oct  8 17:39:53 CEST 2018
From: Srikar Dronamraju <[email-masked]>
Date: Fri, 10 Aug 2018 22:30:18 +0530
Subject: sched/topology: Set correct NUMA topology type

From: Srikar Dronamraju <[email-masked]>

[ 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 <[email-masked]>
Signed-off-by: Peter Zijlstra (Intel) <[email-masked]>
Cc: Andre Wild <[email-masked]>
Cc: Heiko Carstens <[email-masked]>
Cc: Linus Torvalds <[email-masked]>
Cc: Mel Gorman <[email-masked]>
Cc: Michael Ellerman <[email-masked]>
Cc: Peter Zijlstra <[email-masked]>
Cc: Rik van Riel <[email-masked]>
Cc: Suravee Suthikulpanit <[email-masked]>
Cc: Thomas Gleixner <[email-masked]>
Cc: linuxppc-dev <[email-masked]>
Fixes: 051f3ca02e46 "Introduce NUMA identity node sched domain"
Link: http://lkml.kernel.org/r/[email-masked]
Signed-off-by: Ingo Molnar <[email-masked]>
Signed-off-by: Sasha Levin <[email-masked]>
Signed-off-by: Greg Kroah-Hartman <[email-masked]>
---
 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
 	 *

Patches currently in stable-queue which might be from [email-masked] are

queue-4.18/sched-topology-set-correct-numa-topology-type.patch