mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-02 00:40:59 -05:00
scsi: storvsc: setup 1:1 mapping between hardware queue and CPU queue
storvsc doesn't use a dedicated hardware queue for a given CPU queue. When issuing I/O, it selects returning CPU (hardware queue) dynamically based on vmbus channel usage across all channels. This patch advertises num_present_cpus() as number of hardware queues. This will have upper layer setup 1:1 mapping between hardware queue and CPU queue and avoid unnecessary locking when issuing I/O. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Long Li <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
4b062e7cf9
commit
0ed8810276
1 changed files with 1 additions and 2 deletions
|
|
@ -1837,8 +1837,7 @@ static int storvsc_probe(struct hv_device *device,
|
|||
/*
|
||||
* Set the number of HW queues we are supporting.
|
||||
*/
|
||||
if (stor_device->num_sc != 0)
|
||||
host->nr_hw_queues = stor_device->num_sc + 1;
|
||||
host->nr_hw_queues = num_present_cpus();
|
||||
|
||||
/*
|
||||
* Set the error handler work queue.
|
||||
|
|
|
|||
Loading…
Reference in a new issue