]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: storvsc: Prefer returning channel with the same CPU as on the I/O issuing CPU
authorLong Li <longli@microsoft.com>
Thu, 2 Oct 2025 05:05:30 +0000 (22:05 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 7 Oct 2025 02:04:57 +0000 (22:04 -0400)
commitb69ffeaa0ae43892683113b3f4ddf156398738b9
tree56216d3f7a6f36ffa704989fcb290b5c82ac5eeb
parent558ae4579810fa0fef011944230c65a6f3087f85
scsi: storvsc: Prefer returning channel with the same CPU as on the I/O issuing CPU

When selecting an outgoing channel for I/O, storvsc tries to select a
channel with a returning CPU that is not the same as issuing CPU. This
worked well in the past, however it doesn't work well when the Hyper-V
exposes a large number of channels (up to the number of all CPUs). Use a
different CPU for returning channel is not efficient on Hyper-V.

Change this behavior by preferring to the channel with the same CPU as
the current I/O issuing CPU whenever possible.

Tests have shown improvements in newer Hyper-V/Azure environment, and no
regression with older Hyper-V/Azure environments.

Tested-by: Raheel Abdul Faizy <rabdulfaizy@microsoft.com>
Signed-off-by: Long Li <longli@microsoft.com>
Message-Id: <1759381530-7414-1-git-send-email-longli@linux.microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/storvsc_drv.c