diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-28 00:43:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-29 12:43:13 -0500 |
commit | b02038a17b271e0f70616c54e4eccb5cc33d1b74 (patch) | |
tree | b63cbb3aaa911e9504da9571d18eca2799703f97 /net/core/net-sysfs.c | |
parent | 49b4a6546fac02f58784f0744e0f99a6562ccc03 (diff) |
xps: NUMA allocations for per cpu data
store_xps_map() allocates maps that are used by single cpu, it makes
sense to use NUMA allocations.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 99c11294623f..35ef42fa0cf3 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -956,8 +956,9 @@ static ssize_t store_xps_map(struct netdev_queue *queue, | |||
956 | if (map_len >= alloc_len) { | 956 | if (map_len >= alloc_len) { |
957 | alloc_len = alloc_len ? | 957 | alloc_len = alloc_len ? |
958 | 2 * alloc_len : XPS_MIN_MAP_ALLOC; | 958 | 2 * alloc_len : XPS_MIN_MAP_ALLOC; |
959 | new_map = kzalloc(XPS_MAP_SIZE(alloc_len), | 959 | new_map = kzalloc_node(XPS_MAP_SIZE(alloc_len), |
960 | GFP_KERNEL); | 960 | GFP_KERNEL, |
961 | cpu_to_node(cpu)); | ||
961 | if (!new_map) | 962 | if (!new_map) |
962 | goto error; | 963 | goto error; |
963 | new_map->alloc_len = alloc_len; | 964 | new_map->alloc_len = alloc_len; |