Skip to contentSkip to conversation

revert-topology-add-support-for-node_to_mem_node-to-determine-the-fallback-node.patch removed from -mm tree

merged [email protected] 1 participant 1 message Apr 3, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: revert "topology: add support for node_to_mem_node() to determine the fallback node"
has been removed from the -mm tree. Its filename was
revert-topology-add-support-for-node_to_mem_node-to-determine-the-fallback-node.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Vlastimil Babka <[email protected]>
Subject: revert "topology: add support for node_to_mem_node() to determine the fallback node"

This reverts commit ad2c8144418c6a81cefe65379fd47bbe8344cef2.

The function node_to_mem_node() was introduced by that commit for use in SLUB on systems with memoryless nodes, but it turned out to be unreliable on some architectures/configurations and a simpler solution exists than fixing it up.

Thus commit 0715e6c516f1 ("mm, slub: prevent kmalloc_node crashes and memory leaks") removed the only user of node_to_mem_node() and we can revert the commit that introduced the function.

Cc Joonsoo Kim <[email protected]>
Cc Bharata B Rao <[email protected]>
Cc Christopher Lameter <[email protected]>
Cc David Rientjes <[email protected]>
Cc Kirill Tkhai <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Nathan Lynch <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc PUVICHAKRAVARTHY RAMACHANDRAN <[email protected]>
Cc Sachin Sant <[email protected]>

---

 include/linux/topology.h |   17 -----------------
 mm/page_alloc.c          |    1 -
 2 files changed, 18 deletions(-)
include/linux/topology.h renamed from include/linux/topology.h~revert-topology-add-support-for-node_to_mem_node-to-determine-the-fallback-node +0 -16
@@ -130,20 +130,11 @@ static inline int numa_node_id(void)
  * Use the accessor functions set_numa_mem(), numa_mem_id() and cpu_to_mem().
  */
 DECLARE_PER_CPU(int, _numa_mem_);
-extern int _node_numa_mem_[MAX_NUMNODES];
 
 #ifndef set_numa_mem
 static inline void set_numa_mem(int node)
 {
 	this_cpu_write(_numa_mem_, node);
-	_node_numa_mem_[numa_node_id()] = node;
-}
-#endif
-
-#ifndef node_to_mem_node
-static inline int node_to_mem_node(int node)
-{
-	return _node_numa_mem_[node];
 }
 #endif
 
@@ -166,7 +157,6 @@ static inline int cpu_to_mem(int cpu)
 static inline void set_cpu_numa_mem(int cpu, int node)
 {
 	per_cpu(_numa_mem_, cpu) = node;
-	_node_numa_mem_[cpu_to_node(cpu)] = node;
 }
 #endif
 
@@ -180,13 +170,6 @@ static inline int numa_mem_id(void)
 }
 #endif
 
-#ifndef node_to_mem_node
-static inline int node_to_mem_node(int node)
-{
-	return node;
-}
-#endif