diff mbox series

[v2,2/3] scsi: Remove a blk_mq_run_hw_queues() call

Message ID 20230719182243.2810134-3-bvanassche@acm.org (mailing list archive)
State New, archived
Headers show
Series Improve performance for BLK_MQ_F_BLOCKING drivers | expand

Commit Message

Bart Van Assche July 19, 2023, 6:22 p.m. UTC
blk_mq_kick_requeue_list() calls blk_mq_run_hw_queues() asynchronously.
Leave out the direct blk_mq_run_hw_queues() call. This patch causes
scsi_run_queue() to call blk_mq_run_hw_queues() asynchronously instead
of synchronously. Since scsi_run_queue() is not called from the hot I/O
submission path, this patch does not affect the hot path.

Cc: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/scsi_lib.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Christoph Hellwig July 20, 2023, 5:40 a.m. UTC | #1
On Wed, Jul 19, 2023 at 11:22:41AM -0700, Bart Van Assche wrote:
> blk_mq_kick_requeue_list() calls blk_mq_run_hw_queues() asynchronously.
> Leave out the direct blk_mq_run_hw_queues() call. This patch causes
> scsi_run_queue() to call blk_mq_run_hw_queues() asynchronously instead
> of synchronously. Since scsi_run_queue() is not called from the hot I/O
> submission path, this patch does not affect the hot path.

I think this looks good, but a comment in the code that we now rely
on blk_mq_kick_requeue_list to run the queue for us might be useful
as that is a little counter-intuitive.
diff mbox series

Patch

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 414d29eef968..7043ca0f4da9 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -448,7 +448,6 @@  static void scsi_run_queue(struct request_queue *q)
 		scsi_starved_list_run(sdev->host);
 
 	blk_mq_kick_requeue_list(q);
-	blk_mq_run_hw_queues(q, false);
 }
 
 void scsi_requeue_run_queue(struct work_struct *work)