[PATCH 3/5 Trusty SRU] slub: search partial list on numa_mem_id(), instead of numa_node_id()
Tim Gardner
tim.gardner at canonical.com
Thu Jun 19 13:38:29 UTC 2014
From: Joonsoo Kim <iamjoonsoo.kim at lge.com>
BugLink: http://bugs.launchpad.net/bugs/1332063
Currently, if allocation constraint to node is NUMA_NO_NODE, we search a
partial slab on numa_node_id() node. This doesn't work properly on a
system having memoryless nodes, since it can have no memory on that node
so there must be no partial slab on that node.
On that node, page allocation always falls back to numa_mem_id() first.
So searching a partial slab on numa_node_id() in that case is the proper
solution for the memoryless node case.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim at lge.com>
Acked-by: Nishanth Aravamudan <nacc at linux.vnet.ibm.com>
Acked-by: David Rientjes <rientjes at google.com>
Acked-by: Christoph Lameter <cl at linux.com>
Cc: Pekka Enberg <penberg at kernel.org>
Cc: Wanpeng Li <liwanp at linux.vnet.ibm.com>
Cc: Han Pingtian <hanpt at linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
(cherry picked from commit 844e4d66f4ec3b6b6d3bcfcfba3ade2b962771e2)
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/slub.c b/mm/slub.c
index 89490d9..c9b2507 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1698,7 +1698,7 @@ static void *get_partial(struct kmem_cache *s, gfp_t flags, int node,
struct kmem_cache_cpu *c)
{
void *object;
- int searchnode = (node == NUMA_NO_NODE) ? numa_node_id() : node;
+ int searchnode = (node == NUMA_NO_NODE) ? numa_mem_id() : node;
object = get_partial_node(s, get_node(s, searchnode), c, flags);
if (object || node != NUMA_NO_NODE)
--
1.9.1
More information about the kernel-team
mailing list