summaryrefslogtreecommitdiff
path: root/net/xfrm/xfrm_ipcomp.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2013-10-18 03:54:16 -0700
committerSteffen Klassert <steffen.klassert@secunet.com>2013-10-21 09:38:24 +0200
commit5cf4eb54c2dcae681279a9cfca5498cfe65c5384 (patch)
treeaecae983bb2a2fc45a549f4168eb2e69991edba7 /net/xfrm/xfrm_ipcomp.c
parent5bf47256f5433a9a5782754664e5ea04acb0537d (diff)
xfrm: use vmalloc_node() for percpu scratches
scratches are per cpu, we can use vmalloc_node() for proper NUMA affinity. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_ipcomp.c')
-rw-r--r--net/xfrm/xfrm_ipcomp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_ipcomp.c b/net/xfrm/xfrm_ipcomp.c
index 2906d520eea7..b943c7fc5ed2 100644
--- a/net/xfrm/xfrm_ipcomp.c
+++ b/net/xfrm/xfrm_ipcomp.c
@@ -220,8 +220,8 @@ static void ipcomp_free_scratches(void)
static void * __percpu *ipcomp_alloc_scratches(void)
{
- int i;
void * __percpu *scratches;
+ int i;
if (ipcomp_scratch_users++)
return ipcomp_scratches;
@@ -233,7 +233,9 @@ static void * __percpu *ipcomp_alloc_scratches(void)
ipcomp_scratches = scratches;
for_each_possible_cpu(i) {
- void *scratch = vmalloc(IPCOMP_SCRATCH_SIZE);
+ void *scratch;
+
+ scratch = vmalloc_node(IPCOMP_SCRATCH_SIZE, cpu_to_node(i));
if (!scratch)
return NULL;
*per_cpu_ptr(scratches, i) = scratch;