From b02038a17b271e0f70616c54e4eccb5cc33d1b74 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Sun, 28 Nov 2010 05:43:24 +0000 Subject: [PATCH] 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 Cc: Tom Herbert Signed-off-by: David S. Miller --- net/core/net-sysfs.c | 5 +++-- 1 file 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, 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;