linux-stable/drivers
Nick Child 6831582937 ibmvnic: Toggle between queue types in affinity mapping
Previously, ibmvnic IRQs were assigned to CPU numbers by assigning all
the IRQs for transmit queues then assigning all the IRQs for receive
queues. With multi-threaded processors, in a heavy RX or TX environment,
physical cores would either be overloaded or underutilized (due to the
IRQ assignment algorithm). This approach is sub-optimal because IRQs for
the same subprocess (RX or TX) would be bound to adjacent CPU numbers,
meaning they were more likely to be contending for the same core.

For example, in a system with 64 CPU's and 32 queues, the IRQs would
be bound to CPU in the following pattern:

IRQ type |  CPU number
-----------------------
TX0	 |	0-1
TX1	 |	2-3
<etc>
RX0	 |	32-33
RX1	 |	34-35
<etc>

Observe that in SMT-8, the first 4 tx queues would be sharing the
same core.

A more optimal algorithm would balance the number RX and TX IRQ's across
the physical cores. Therefore, to increase performance, distribute RX and
TX IRQs across cores by alternating between assigning IRQs for RX and TX
queues to CPUs.
With a system with 64 CPUs and 32 queues, this results in the following
pattern:

IRQ type |  CPU number
-----------------------
TX0	 |	0-1
RX0	 |	2-3
TX1	 |	4-5
RX1	 |	6-7
<etc>

Observe that in SMT-8, there is equal distribution of RX and TX IRQs
per core. In the above case, each core handles 2 TX and 2 RX IRQ's.

Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Reviewed-by: Haren Myneni <haren@linux.ibm.com>
Link: https://lore.kernel.org/r/20230127214358.318152-1-nnac123@linux.ibm.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-01-31 10:09:13 +01:00
..
accel
accessibility tty: fix possible null-ptr-defer in spk_ttyio_release 2023-01-19 16:24:04 +01:00
acpi Merge branches 'acpi-prm' and 'acpi-video' 2023-01-20 18:42:16 +01:00
amba
android
ata
atm
auxdisplay
base Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-27 22:56:18 -08:00
bcma
block block-6.2-2023-01-20 2023-01-20 12:44:41 -08:00
bluetooth
bus
cdrom
char
clk
clocksource
comedi comedi: adv_pci1760: Fix PWM instruction handling 2023-01-19 17:24:47 +01:00
connector
counter
cpufreq
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma ptdma: pt_core_execute_cmd() should use spinlock 2023-01-19 18:59:34 +05:30
dma-buf
edac EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info 2023-01-20 19:47:34 +01:00
eisa
extcon
firewire
firmware Char/Misc driver fixes for 6.2-rc5 2023-01-21 11:20:55 -08:00
fpga
fsi
gnss
gpio
gpu treewide: fix up files incorrectly marked executable 2023-01-26 10:05:39 -08:00
greybus
hid for-linus-2023011801 2023-01-18 14:44:32 -08:00
hsi
hte
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
idle
iio
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-27 22:56:18 -08:00
input
interconnect
iommu
ipack
irqchip
isdn
leds
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd mfd: ocelot: add external ocelot switch control 2023-01-30 21:07:21 -08:00
misc VMCI: Use threaded irqs instead of tasklets 2023-01-20 13:24:11 +01:00
mmc
most
mtd
mux
net ibmvnic: Toggle between queue types in affinity mapping 2023-01-31 10:09:13 +01:00
nfc
ntb
nubus
nvdimm
nvme Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-27 22:56:18 -08:00
nvmem
of
opp
parisc
parport
pci
pcmcia
peci
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp ptp_qoriq: fix latency in ptp_qoriq_adjtime() operation 2023-01-20 18:20:38 -08:00
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 net/smc: De-tangle ism and smc device initialization 2023-01-25 09:46:49 +00:00
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-27 22:56:18 -08:00
sh
siox
slimbus
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-27 22:56:18 -08:00
soundwire
spi
spmi
ssb
staging
target Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-27 22:56:18 -08:00
tc
tee
thermal thermal: core: call put_device() only after device_register() fails 2023-01-19 21:06:41 +01:00
thunderbolt
tty TTY/Serial driver fixes for 6.2-rc5 2023-01-21 11:12:42 -08:00
ufs scsi: ufs: core: Fix devfreq deadlocks 2023-01-18 19:08:37 -05:00
uio
usb USB / Thunderbolt fixes for 6.2-rc5 2023-01-21 11:10:03 -08:00
vdpa
vfio
vhost
video
virt
virtio
vlynq
w1 w1: fix WARNING after calling w1_process() 2023-01-19 17:26:33 +01:00
watchdog
xen net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
zorro
Kconfig
Makefile