提交 9cfad4a5 编写于 作者: M Michael Kelley (EOSG) 提交者: Martin K. Petersen

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: NMichael Kelley <mikelley@microsoft.com>
Reviewed-by: NLong Li <longli@microsoft.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 9ff97fa8
...@@ -1310,7 +1310,8 @@ static int storvsc_do_io(struct hv_device *device, ...@@ -1310,7 +1310,8 @@ static int storvsc_do_io(struct hv_device *device,
*/ */
cpumask_and(&alloced_mask, &stor_device->alloced_cpus, cpumask_and(&alloced_mask, &stor_device->alloced_cpus,
cpumask_of_node(cpu_to_node(q_num))); 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) { if (tgt_cpu != outgoing_channel->target_cpu) {
outgoing_channel = outgoing_channel =
stor_device->stor_chns[tgt_cpu]; stor_device->stor_chns[tgt_cpu];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册