The node distance is hardcoded to 0, which causes a trouble for some user-level applications. In particular, "libnuma" expects the distance of a node to itself as LOCAL_DISTANCE. This update removes the offending node distance override.
Cc: stable@vger.kernel.org # v5.6+ Cc: Heiko Carstens hca@linux.ibm.com Fixes: 701dc81e7412 ("s390/mm: remove fake numa support") Signed-off-by: Alexander Gordeev agordeev@linux.ibm.com --- arch/s390/include/asm/topology.h | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h index fbb5075..3a0ac0c 100644 --- a/arch/s390/include/asm/topology.h +++ b/arch/s390/include/asm/topology.h @@ -86,12 +86,6 @@ static inline const struct cpumask *cpumask_of_node(int node)
#define pcibus_to_node(bus) __pcibus_to_node(bus)
-#define node_distance(a, b) __node_distance(a, b) -static inline int __node_distance(int a, int b) -{ - return 0; -} - #else /* !CONFIG_NUMA */
#define numa_node_id numa_node_id
On Tue, Aug 04, 2020 at 08:35:49PM +0200, Alexander Gordeev wrote:
The node distance is hardcoded to 0, which causes a trouble for some user-level applications. In particular, "libnuma" expects the distance of a node to itself as LOCAL_DISTANCE. This update removes the offending node distance override.
Cc: stable@vger.kernel.org # v5.6+ Cc: Heiko Carstens hca@linux.ibm.com Fixes: 701dc81e7412 ("s390/mm: remove fake numa support") Signed-off-by: Alexander Gordeev agordeev@linux.ibm.com
arch/s390/include/asm/topology.h | 6 ------ 1 file changed, 6 deletions(-)
It would have been nice if the Fixes tag would be correct, since then there would be hardly any backport necessary. But unfortunately this is broken since we support numa.
Older code had this:
int __node_distance(int a, int b) { return mode->distance ? mode->distance(a, b) : 0; } EXPORT_SYMBOL(__node_distance);
And the distance function was only set for the emulation mode, but not the default ("plain") mode.
I'll change that in the commit message.
linux-stable-mirror@lists.linaro.org