aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-06-04 19:11:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:14 -0400
commit72d09633c9afa02bea317d65eb8b8a4ce7659a2a (patch)
tree0ba5329fbb8261c0b24591532d2bc83a4067a2e4 /mm
parentd867f203b974e9a670028fda909ef09044b221f6 (diff)
mm/zswap: NUMA aware allocation for zswap_dstmem
zswap_dstmem is a percpu block of memory, which should be allocated using kmalloc_node(), to get better NUMA locality. Without it, all the blocks are allocated from a single node. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Seth Jennings <sjennings@variantweb.net> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/zswap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/zswap.c b/mm/zswap.c
index aeaef0fb5624..008388fe7b0f 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -347,7 +347,7 @@ static int __zswap_cpu_notifier(unsigned long action, unsigned long cpu)
347 return NOTIFY_BAD; 347 return NOTIFY_BAD;
348 } 348 }
349 *per_cpu_ptr(zswap_comp_pcpu_tfms, cpu) = tfm; 349 *per_cpu_ptr(zswap_comp_pcpu_tfms, cpu) = tfm;
350 dst = kmalloc(PAGE_SIZE * 2, GFP_KERNEL); 350 dst = kmalloc_node(PAGE_SIZE * 2, GFP_KERNEL, cpu_to_node(cpu));
351 if (!dst) { 351 if (!dst) {
352 pr_err("can't allocate compressor buffer\n"); 352 pr_err("can't allocate compressor buffer\n");
353 crypto_free_comp(tfm); 353 crypto_free_comp(tfm);