Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-07-21 15:26:40 +0200
committerTakashi Iwai <tiwai@suse.de>2017-07-21 15:26:40 +0200
commit6beeafd8e0fbc498cdecae951a90fe539a197073 (patch)
treea072f0d38188aebab2d429b201232ed3d99f6d91
parentb7ce4e444e92dd3c83f7be3f7881bcc3ddb06d79 (diff)
Revert "powerpc/numa: Fix percpu allocations to be NUMA aware"rpm-4.4.73-7
(bsc#1048914).
-rw-r--r--patches.fixes/Revert-powerpc-numa-Fix-percpu-allocations-to-be-NUM82
-rw-r--r--series.conf2
2 files changed, 84 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..a3d6eeef85
--- /dev/null
+++ b/patches.fixes/Revert-powerpc-numa-Fix-percpu-allocations-to-be-NUM
@@ -0,0 +1,82 @@
+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>
+
+---
+ 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 e90ad9f88d..9c35ad0f84 100644
--- a/series.conf
+++ b/series.conf
@@ -1057,6 +1057,8 @@
patches.arch/powerpc-bigmem-22-mmap-Any-hint-128TB-searches-the-full-VA-space.patch
patches.arch/powerpc-bigmem-23-mm-Fix-swapper_pg_dir-size-on-64-bit-hash-w-64K-pages.patch
+ patches.fixes/Revert-powerpc-numa-Fix-percpu-allocations-to-be-NUM
+
########################################################
# powerpc/little endian
########################################################