diff options
author | Michael Kelley (EOSG) <Michael.H.Kelley@microsoft.com> | 2018-01-24 22:14:08 +0000 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-02-21 22:30:40 -0500 |
commit | 9cfad4a5f4f795715c8657fb7dc22574a6046327 (patch) | |
tree | 08f6d2f014c10bd27510c79dccf346f89ca3cc57 /drivers/scsi | |
parent | 9ff97fa8db94caeab59a3c5401e975df468b4d8e (diff) | |
download | linux-9cfad4a5f4f795715c8657fb7dc22574a6046327.tar.gz linux-9cfad4a5f4f795715c8657fb7dc22574a6046327.tar.bz2 linux-9cfad4a5f4f795715c8657fb7dc22574a6046327.zip |
scsi: storvsc: Spread interrupts when picking a channel for I/O requests
Update the algorithm in storvsc_do_io to look for a channel
starting with the current CPU + 1 and wrap around (within the
current NUMA node). This spreads VMbus interrupts more evenly
across CPUs. Previous code always started with first CPU in
the current NUMA node, skewing the interrupt load to that CPU.
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Reviewed-by: Long Li <longli@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/storvsc_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 8eadb30115aa..620510787763 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1310,7 +1310,8 @@ static int storvsc_do_io(struct hv_device *device, */ cpumask_and(&alloced_mask, &stor_device->alloced_cpus, cpumask_of_node(cpu_to_node(q_num))); - for_each_cpu(tgt_cpu, &alloced_mask) { + for_each_cpu_wrap(tgt_cpu, &alloced_mask, + outgoing_channel->target_cpu + 1) { if (tgt_cpu != outgoing_channel->target_cpu) { outgoing_channel = stor_device->stor_chns[tgt_cpu]; |