From: Eric Dumazet Date: Wed, 18 Dec 2013 14:46:23 +0000 (-0800) Subject: rps: NUMA flow limit allocations X-Git-Tag: upstream/snapshot3+hdmi~3572^2~420 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b59d467ad9ff9c014b99f4cfc2ea627b0806d07;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git rps: NUMA flow limit allocations Given we allocate memory for each cpu, we can do this using NUMA affinities, instead of using NUMA policies of the process changing flow_limit_cpu_bitmap value. Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Signed-off-by: David S. Miller --- diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index cca4441..cf9cd13 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -122,7 +122,8 @@ static int flow_limit_cpu_sysctl(struct ctl_table *table, int write, synchronize_rcu(); kfree(cur); } else if (!cur && cpumask_test_cpu(i, mask)) { - cur = kzalloc(len, GFP_KERNEL); + cur = kzalloc_node(len, GFP_KERNEL, + cpu_to_node(i)); if (!cur) { /* not unwinding previous changes */ ret = -ENOMEM;