]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Use affinity hint
authorYuval Atias <yuvala@mellanox.com>
Mon, 9 Jun 2014 07:24:39 +0000 (10:24 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jun 2014 21:58:16 +0000 (14:58 -0700)
commitd1881be202009daa9c0722e0bb0cb22a57912aa8
tree1185661e0b45731a3c52278277729f73fce6e85c
parent92fe29c3a0d63497d90e0bd6c24a9960da51e531
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/net/ethernet/mellanox/mlx4/en_cq.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h