diff options
| author | Eric Dumazet <edumazet@google.com> | 2013-12-18 09:46:23 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-12-19 19:00:07 -0500 |
| commit | 5b59d467ad9ff9c014b99f4cfc2ea627b0806d07 (patch) | |
| tree | 344e475e80f92095a71e1a474de1a37ca01897fb | |
| parent | c5036813559ed45b517f28be876b29ccead689c5 (diff) | |
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 <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/core/sysctl_net_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index cca444190907..cf9cd13509a7 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, | |||
| 122 | synchronize_rcu(); | 122 | synchronize_rcu(); |
| 123 | kfree(cur); | 123 | kfree(cur); |
| 124 | } else if (!cur && cpumask_test_cpu(i, mask)) { | 124 | } else if (!cur && cpumask_test_cpu(i, mask)) { |
| 125 | cur = kzalloc(len, GFP_KERNEL); | 125 | cur = kzalloc_node(len, GFP_KERNEL, |
| 126 | cpu_to_node(i)); | ||
| 126 | if (!cur) { | 127 | if (!cur) { |
| 127 | /* not unwinding previous changes */ | 128 | /* not unwinding previous changes */ |
| 128 | ret = -ENOMEM; | 129 | ret = -ENOMEM; |
