Skip to content

Commit

Permalink
xps: NUMA allocations for per cpu data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 29, 2010
1 parent 49b4a65 commit b02038a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,8 +956,9 @@ static ssize_t store_xps_map(struct netdev_queue *queue,
if (map_len >= alloc_len) {
alloc_len = alloc_len ?
2 * alloc_len : XPS_MIN_MAP_ALLOC;
new_map = kzalloc(XPS_MAP_SIZE(alloc_len),
GFP_KERNEL);
new_map = kzalloc_node(XPS_MAP_SIZE(alloc_len),
GFP_KERNEL,
cpu_to_node(cpu));
if (!new_map)
goto error;
new_map->alloc_len = alloc_len;
Expand Down

0 comments on commit b02038a

Please sign in to comment.