linux_dsm_epyc7002/drivers/net/ethernet/intel
Guilherme G. Piccoli 7f6c553902 i40e: use valid online CPU on q_vector initialization
Currently, the q_vector initialization routine sets the affinity_mask
of a q_vector based on v_idx value. Meaning a loop iterates on v_idx,
which is an incremental value, and the cpumask is created based on
this value.

This is a problem in systems with multiple logical CPUs per core (like in
SMT scenarios). If we disable some logical CPUs, by turning SMT off for
example, we will end up with a sparse cpu_online_mask, i.e., only the first
CPU in a core is online, and incremental filling in q_vector cpumask might
lead to multiple offline CPUs being assigned to q_vectors.

Example: if we have a system with 8 cores each one containing 8 logical
CPUs (SMT == 8 in this case), we have 64 CPUs in total. But if SMT is
disabled, only the 1st CPU in each core remains online, so the
cpu_online_mask in this case would have only 8 bits set, in a sparse way.

In general case, when SMT is off the cpu_online_mask has only C bits set:
0, 1*N, 2*N, ..., C*(N-1)  where
C == # of cores;
N == # of logical CPUs per core.
In our example, only bits 0, 8, 16, 24, 32, 40, 48, 56 would be set.

This patch changes the way q_vector's affinity_mask is created: it iterates
on v_idx, but consumes the CPU index from the cpu_online_mask instead of
just using the v_idx incremental value.

No functional changes were introduced.

Signed-off-by: Guilherme G Piccoli <gpiccoli@linux.vnet.ibm.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-07-14 23:39:12 -07:00
..
e1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-04-09 17:41:41 -04:00
e1000e e1000e: keep Rx/Tx HW_VLAN_CTAG in sync 2016-06-29 09:10:17 -07:00
fm10k treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
i40e i40e: use valid online CPU on q_vector initialization 2016-07-14 23:39:12 -07:00
i40evf i40e/i40evf: Fix i40e_rx_checksum 2016-07-14 23:17:45 -07:00
igb intel: Add support for IPv6 IP-in-IP offload 2016-05-20 19:25:52 -04:00
igbvf intel: Add support for IPv6 IP-in-IP offload 2016-05-20 19:25:52 -04:00
ixgb
ixgbe ixgbe: napi_poll must return the work done 2016-07-14 23:34:52 -07:00
ixgbevf ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val 2016-06-29 09:18:06 -07:00
e100.c
Kconfig net: intel: remove dead links 2016-04-06 20:54:45 -07:00
Makefile