net sched: use xps information for qdisc NUMA affinity
Allocate qdisc memory according to NUMA properties of cpus included in xps map. To be effective, qdisc should be (re)setup after changes of /sys/class/net/eth<n>/queues/tx-<n>/xps_cpus I added a numa_node field in struct netdev_queue, containing NUMA node if all cpus included in xps_cpus share same node, else -1. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ben Hutchings <bhutchings@solarflare.com> Cc: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
@@ -553,7 +553,9 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
|
||||
size = QDISC_ALIGN(sizeof(*sch));
|
||||
size += ops->priv_size + (QDISC_ALIGNTO - 1);
|
||||
|
||||
p = kzalloc(size, GFP_KERNEL);
|
||||
p = kzalloc_node(size, GFP_KERNEL,
|
||||
netdev_queue_numa_node_read(dev_queue));
|
||||
|
||||
if (!p)
|
||||
goto errout;
|
||||
sch = (struct Qdisc *) QDISC_ALIGN((unsigned long) p);
|
||||
|
新增問題並參考
封鎖使用者