linux_dsm_epyc7002/drivers/net/ethernet/intel
Alan Brady 96db776a36 i40e/i40evf: fix interrupt affinity bug
There exists a bug in which a 'perfect storm' can occur and cause
interrupts to fail to be correctly affinitized. This causes unexpected
behavior and has a substantial impact on performance when it happens.

The bug occurs if there is heavy traffic, any number of CPUs that have
an i40e interrupt are pegged at 100%, and the interrupt afffinity for
those CPUs is changed.  Instead of moving to the new CPU, the interrupt
continues to be polled while there is heavy traffic.

The bug is most readily realized as the driver is first brought up and
all interrupts start on CPU0. If there is heavy traffic and the
interrupt starts polling before the interrupt is affinitized, the
interrupt will be stuck on CPU0 until traffic stops. The bug, however,
can also be wrought out more simply by affinitizing all the interrupts
to a single CPU and then attempting to move any of those interrupts off
while there is heavy traffic.

This patch fixes the bug by registering for update notifications from
the kernel when the interrupt affinity changes. When that fires, we
cache the intended affinity mask. Then, while polling, if the cpu is
pegged at 100% and we failed to clean the rings, we check to make sure
we have the correct affinity and stop polling if we're firing on the
wrong CPU.  When the kernel successfully moves the interrupt, it will
start polling on the correct CPU. The performance impact is minimal
since the only time this section gets executed is when performance is
already compromised by the CPU.

Change-ID: I4410a880159b9dba1f8297aa72bef36dca34e830
Signed-off-by: Alan Brady <alan.brady@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-10-28 23:28:39 -07:00
..
e1000 ethernet/intel: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
e1000e ethernet/intel: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
fm10k ethernet/intel: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
i40e i40e/i40evf: fix interrupt affinity bug 2016-10-28 23:28:39 -07:00
i40evf i40e/i40evf: fix interrupt affinity bug 2016-10-28 23:28:39 -07:00
igb ethernet/intel: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
igbvf ethernet/intel: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
ixgb ethernet/intel: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
ixgbe ixgbe: Flip to the new dev walk API 2016-10-18 11:44:59 -04:00
ixgbevf ethernet/intel: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
e100.c ethernet/intel: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
Kconfig ixgbe: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_port 2016-06-17 20:23:30 -07:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00