diff mbox series

[v2,1/3] scsi: Inline scsi_kick_queue()

Message ID 20230719182243.2810134-2-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
scsi_kick_queue() is too short to keep it as a separate function. Hence
inline it. This patch prepares for modifying the second argument passed
to blk_mq_run_hw_queues().

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

Comments

Christoph Hellwig July 20, 2023, 5:39 a.m. UTC | #1
On Wed, Jul 19, 2023 at 11:22:40AM -0700, Bart Van Assche wrote:
> scsi_kick_queue() is too short to keep it as a separate function. Hence
> inline it. This patch prepares for modifying the second argument passed
> to blk_mq_run_hw_queues().

It wouldn't say "too short" as short functions can be useful too.
But this one is indeed quite pointless, so the change looks good,
even if the commit log could be improved a bit:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index ad9afae49544..414d29eef968 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -300,11 +300,6 @@  void scsi_device_unbusy(struct scsi_device *sdev, struct scsi_cmnd *cmd)
 	cmd->budget_token = -1;
 }
 
-static void scsi_kick_queue(struct request_queue *q)
-{
-	blk_mq_run_hw_queues(q, false);
-}
-
 /*
  * Kick the queue of SCSI device @sdev if @sdev != current_sdev. Called with
  * interrupts disabled.
@@ -340,7 +335,7 @@  static void scsi_single_lun_run(struct scsi_device *current_sdev)
 	 * but in most cases, we will be first. Ideally, each LU on the
 	 * target would get some limited time or requests on the target.
 	 */
-	scsi_kick_queue(current_sdev->request_queue);
+	blk_mq_run_hw_queues(current_sdev->request_queue, false);
 
 	spin_lock_irqsave(shost->host_lock, flags);
 	if (!starget->starget_sdev_user)
@@ -427,7 +422,7 @@  static void scsi_starved_list_run(struct Scsi_Host *shost)
 			continue;
 		spin_unlock_irqrestore(shost->host_lock, flags);
 
-		scsi_kick_queue(slq);
+		blk_mq_run_hw_queues(slq, false);
 		blk_put_queue(slq);
 
 		spin_lock_irqsave(shost->host_lock, flags);