Skip to content

Commit 0a2efaf

Browse files
Sebastian Andrzej Siewioraxboe
authored andcommitted
blk-mq: Always complete remote completions requests in softirq
Controllers with multiple queues have their IRQ-handelers pinned to a CPU. The core shouldn't need to complete the request on a remote CPU. Remove this case and always raise the softirq to complete the request. Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Daniel Wagner <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 93e4f73 commit 0a2efaf

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

block/blk-mq.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -628,19 +628,7 @@ static void __blk_mq_complete_request_remote(void *data)
628628
{
629629
struct request *rq = data;
630630

631-
/*
632-
* For most of single queue controllers, there is only one irq vector
633-
* for handling I/O completion, and the only irq's affinity is set
634-
* to all possible CPUs. On most of ARCHs, this affinity means the irq
635-
* is handled on one specific CPU.
636-
*
637-
* So complete I/O requests in softirq context in case of single queue
638-
* devices to avoid degrading I/O performance due to irqsoff latency.
639-
*/
640-
if (rq->q->nr_hw_queues == 1)
641-
blk_mq_trigger_softirq(rq);
642-
else
643-
rq->q->mq_ops->complete(rq);
631+
blk_mq_trigger_softirq(rq);
644632
}
645633

646634
static inline bool blk_mq_complete_need_ipi(struct request *rq)

0 commit comments

Comments
 (0)