]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Use affinity hint
authorYuval Atias <yuvala@mellanox.com>
Sun, 25 May 2014 14:47:27 +0000 (17:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Jun 2014 02:16:29 +0000 (19:16 -0700)
commit70ccb5409daf5fe8e314721893b0cf3043e05648
tree89dbe2c36c695f2e4c79429f4362bc07df2cc1de
parent7a53ef820bbd340c3cd1a700ff9799594e95ef36
net/mlx4_en: Use affinity hint

The “affinity hint” mechanism is used by the user space
daemon, irqbalancer, to indicate a preferred CPU mask for irqs.
Irqbalancer can use this hint to balance the irqs between the
cpus indicated by the mask.

We wish the HCA to preferentially map the IRQs it uses to numa cores
close to it.  To accomplish this, we use cpumask_set_cpu_local_first(), that
sets the affinity hint according the following policy:
First it maps IRQs to “close” numa cores.  If these are exhausted, the
remaining IRQs are mapped to “far” numa cores.

Signed-off-by: Yuval Atias <yuvala@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/hw/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/en_cq.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/eq.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
include/linux/mlx4/device.h