Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2017-07-27 16:33:26 +0200
committerTakashi Iwai <tiwai@suse.de>2017-08-07 20:24:48 +0200
commitc0fdc479df2fef96d60034c57bc4fb6b4474b13f (patch)
treeb18d8c10d3e889cb769e92ebfb3e21e6ef4e20e4
parent8775072499c3d0ab8daa6b3ba4de2ca5ae08c1b6 (diff)
Revert "powerpc/numa: Fix percpu allocations to be NUMA aware"rpm-4.4.74-92.35
(bsc#1048914).
-rw-r--r--patches.fixes/Revert-powerpc-numa-Fix-percpu-allocations-to-be-NUM83
-rw-r--r--series.conf2
2 files changed, 85 insertions, 0 deletions
diff --git a/patches.fixes/Revert-powerpc-numa-Fix-percpu-allocations-to-be-NUM b/patches.fixes/Revert-powerpc-numa-Fix-percpu-allocations-to-be-NUM
new file mode 100644
index 0000000000..4a1952c5aa
--- /dev/null
+++ b/patches.fixes/Revert-powerpc-numa-Fix-percpu-allocations-to-be-NUM
@@ -0,0 +1,83 @@
+From 3e475ebf8b669d9d9f879460f84533f53f2eecc2 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Fri, 21 Jul 2017 15:15:21 +0200
+Subject: [PATCH] Revert "powerpc/numa: Fix percpu allocations to be NUMA
+ aware"
+References: bsc#1048914
+Patch-mainline: No, a quick stop-gap solution
+
+This reverts commit 8c92870bdbf2 ("powerpc/numa: Fix percpu
+allocations to be NUMA aware") included in 4.4.72 stable, as it
+introduced a regression on 192core + 32TB brazos as found in
+bsc#1048914.
+
+As Jiri Kosina explained in the bugzilla:
+"Which basically means, that prior to this commit, percpu allocator on
+ powerpc was (wrongly) allocating all percpu areas on NUMA node 0. With
+ this commit applied, the percpu allocations are properly spread across
+ all the NUMA nodes.
+
+ I believe this might potentially have other side-effects, especially
+ with respect to how the distance is being calculated in
+ pcpu_get_vm_areas(); it might be that the calculation gets confused
+ (it's also possible that pcpu_get_vm_areas() is running so early that
+ not all NUMA structures have been properly initialized -- this would
+ have to be confirmed by someone more familiar with the ppc arch
+ code)."
+
+Ideally this should be done in the stable tree, but we're in hurry so
+we take this now as a quick stop-gap fix.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Michal Hocko <mhocko@suse.com>
+
+---
+ arch/powerpc/include/asm/topology.h | 14 --------------
+ arch/powerpc/kernel/setup_64.c | 4 ++--
+ 2 files changed, 2 insertions(+), 16 deletions(-)
+
+--- a/arch/powerpc/include/asm/topology.h
++++ b/arch/powerpc/include/asm/topology.h
+@@ -44,22 +44,8 @@ extern void __init dump_numa_cpu_topolog
+ extern int sysfs_add_device_to_node(struct device *dev, int nid);
+ extern void sysfs_remove_device_from_node(struct device *dev, int nid);
+
+-static inline int early_cpu_to_node(int cpu)
+-{
+- int nid;
+-
+- nid = numa_cpu_lookup_table[cpu];
+-
+- /*
+- * Fall back to node 0 if nid is unset (it should be, except bugs).
+- * This allows callers to safely do NODE_DATA(early_cpu_to_node(cpu)).
+- */
+- return (nid < 0) ? 0 : nid;
+-}
+ #else
+
+-static inline int early_cpu_to_node(int cpu) { return 0; }
+-
+ static inline void dump_numa_cpu_topology(void) {}
+
+ static inline int sysfs_add_device_to_node(struct device *dev, int nid)
+--- a/arch/powerpc/kernel/setup_64.c
++++ b/arch/powerpc/kernel/setup_64.c
+@@ -763,7 +763,7 @@ void __init setup_arch(char **cmdline_p)
+
+ static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size, size_t align)
+ {
+- return __alloc_bootmem_node(NODE_DATA(early_cpu_to_node(cpu)), size, align,
++ return __alloc_bootmem_node(NODE_DATA(cpu_to_node(cpu)), size, align,
+ __pa(MAX_DMA_ADDRESS));
+ }
+
+@@ -774,7 +774,7 @@ static void __init pcpu_fc_free(void *pt
+
+ static int pcpu_cpu_distance(unsigned int from, unsigned int to)
+ {
+- if (early_cpu_to_node(from) == early_cpu_to_node(to))
++ if (cpu_to_node(from) == cpu_to_node(to))
+ return LOCAL_DISTANCE;
+ else
+ return REMOTE_DISTANCE;
diff --git a/series.conf b/series.conf
index 201cd15186..e8db24e598 100644
--- a/series.conf
+++ b/series.conf
@@ -852,6 +852,8 @@
patches.arch/powerpc-add-kernel-parameter-iommu_alloc_quiet.patch
+ patches.fixes/Revert-powerpc-numa-Fix-percpu-allocations-to-be-NUM
+
########################################################
# powerpc/little endian
########################################################