projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d867f20
)
mm/zswap: NUMA aware allocation for zswap_dstmem
author
Eric Dumazet
<
[email protected]
>
Wed, 4 Jun 2014 23:11:11 +0000
(16:11 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 4 Jun 2014 23:54:14 +0000
(16:54 -0700)
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 <
[email protected]
>
Acked-by: Seth Jennings <
[email protected]
>
Acked-by: David Rientjes <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/zswap.c
patch
|
blob
|
history
diff --git
a/mm/zswap.c
b/mm/zswap.c
index aeaef0fb562400093a91517e9ce62ca63cb94bed..008388fe7b0ff923b2300504b3a7717869fe12f8 100644
(file)
--- a/
mm/zswap.c
+++ b/
mm/zswap.c
@@
-347,7
+347,7
@@
static int __zswap_cpu_notifier(unsigned long action, unsigned long cpu)
return NOTIFY_BAD;
}
*per_cpu_ptr(zswap_comp_pcpu_tfms, cpu) = tfm;
- dst = kmalloc
(PAGE_SIZE * 2, GFP_KERNEL
);
+ dst = kmalloc
_node(PAGE_SIZE * 2, GFP_KERNEL, cpu_to_node(cpu)
);
if (!dst) {
pr_err("can't allocate compressor buffer\n");
crypto_free_comp(tfm);