From f899b8061e7dc46aa2fa30915ed3c8f2cec65253 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 26 May 2018 19:44:58 +0100 Subject: rename : sys-kernel/linux-{image,headers}-lts -> sys-kernel/linux-{image,sources}-redcore-lts, version bump --- ...introduce-NUMA-identity-node-sched-domain.patch | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sys-kernel/linux-sources-redcore-lts/files/introduce-NUMA-identity-node-sched-domain.patch (limited to 'sys-kernel/linux-sources-redcore-lts/files/introduce-NUMA-identity-node-sched-domain.patch') diff --git a/sys-kernel/linux-sources-redcore-lts/files/introduce-NUMA-identity-node-sched-domain.patch b/sys-kernel/linux-sources-redcore-lts/files/introduce-NUMA-identity-node-sched-domain.patch new file mode 100644 index 00000000..2376edae --- /dev/null +++ b/sys-kernel/linux-sources-redcore-lts/files/introduce-NUMA-identity-node-sched-domain.patch @@ -0,0 +1,46 @@ +diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c +index 808998fe1..18d3321ef 100644 +--- a/kernel/sched/topology.c ++++ b/kernel/sched/topology.c +@@ -1339,6 +1339,10 @@ void sched_init_numa(void) + if (!sched_domains_numa_distance) + return; + ++ /* Includes NUMA identity node at level 0. */ ++ sched_domains_numa_distance[level++] = curr_distance; ++ sched_domains_numa_levels = level; ++ + /* + * O(nr_nodes^2) deduplicating selection sort -- in order to find the + * unique distances in the node_distance() table. +@@ -1386,8 +1390,7 @@ void sched_init_numa(void) + return; + + /* +- * 'level' contains the number of unique distances, excluding the +- * identity distance node_distance(i,i). ++ * 'level' contains the number of unique distances + * + * The sched_domains_numa_distance[] array includes the actual distance + * numbers. +@@ -1448,10 +1451,19 @@ void sched_init_numa(void) + for (i = 0; sched_domain_topology[i].mask; i++) + tl[i] = sched_domain_topology[i]; + ++ /* ++ * Add the NUMA identity distance, aka single NODE. ++ */ ++ tl[i++] = (struct sched_domain_topology_level){ ++ .mask = sd_numa_mask, ++ .numa_level = 0, ++ SD_INIT_NAME(NODE) ++ }; ++ + /* + * .. and append 'j' levels of NUMA goodness. + */ +- for (j = 0; j < level; i++, j++) { ++ for (j = 1; j < level; i++, j++) { + tl[i] = (struct sched_domain_topology_level){ + .mask = sd_numa_mask, + .sd_flags = cpu_numa_flags, -- cgit v1.2.3