mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-17 02:54:47 +00:00
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> |
||
|---|---|---|
| .. | ||
| i40e_adminq_cmd.h | ||
| i40e_adminq.c | ||
| i40e_adminq.h | ||
| i40e_alloc.h | ||
| i40e_client.c | ||
| i40e_client.h | ||
| i40e_common.c | ||
| i40e_dcb_nl.c | ||
| i40e_dcb.c | ||
| i40e_dcb.h | ||
| i40e_debugfs.c | ||
| i40e_devids.h | ||
| i40e_diag.c | ||
| i40e_diag.h | ||
| i40e_ethtool.c | ||
| i40e_fcoe.c | ||
| i40e_fcoe.h | ||
| i40e_hmc.c | ||
| i40e_hmc.h | ||
| i40e_lan_hmc.c | ||
| i40e_lan_hmc.h | ||
| i40e_main.c | ||
| i40e_nvm.c | ||
| i40e_osdep.h | ||
| i40e_prototype.h | ||
| i40e_ptp.c | ||
| i40e_register.h | ||
| i40e_status.h | ||
| i40e_txrx.c | ||
| i40e_txrx.h | ||
| i40e_type.h | ||
| i40e_virtchnl_pf.c | ||
| i40e_virtchnl_pf.h | ||
| i40e_virtchnl.h | ||
| i40e.h | ||
| Makefile | ||