All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Anderson <dianders@chromium.org>
To: axboe@kernel.dk, jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: Ming Lei <ming.lei@redhat.com>,
	linux-scsi@vger.kernel.org, sqazi@google.com,
	Gwendal Grignou <gwendal@chromium.org>,
	groeck@chromium.org, linux-block@vger.kernel.org,
	paolo.valente@linaro.org,
	Douglas Anderson <dianders@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 4/4] Revert "scsi: core: run queue if SCSI device queue isn't ready and queue is idle"
Date: Tue,  7 Apr 2020 15:00:05 -0700	[thread overview]
Message-ID: <20200407145906.v3.4.I630e6ca4cdcf9ab13ea899274745f9e3174eb12b@changeid> (raw)
In-Reply-To: <20200407220005.119540-1-dianders@chromium.org>

This reverts commit 7e70aa789d4a0c89dbfbd2c8a974a4df717475ec.

Now that we have the patches ("blk-mq: In blk_mq_dispatch_rq_list()
"no budget" is a reason to kick") and ("blk-mq: Rerun dispatching in
the case of budget contention") we should no longer need the fix in
the SCSI code.  Revert it, resolving conflicts with other patches that
have touched this code.

With this revert (and the two new patches) I can run the script that
was in commit 7e70aa789d4a ("scsi: core: run queue if SCSI device
queue isn't ready and queue is idle") in a loop with no failure.  If I
do this revert without the two new patches I can easily get a failure.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
I don't know for sure that we can revert this patch, but in the very
least the original test case now passes.  If there is any question
about this, we can just drop this patch.

Changes in v3:
- ("Revert "scsi: core: run queue...") new for v3.

Changes in v2: None

 drivers/scsi/scsi_lib.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 47835c4b4ee0..ea18f618dc66 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1610,12 +1610,7 @@ static bool scsi_mq_get_budget(struct blk_mq_hw_ctx *hctx)
 	struct request_queue *q = hctx->queue;
 	struct scsi_device *sdev = q->queuedata;
 
-	if (scsi_dev_queue_ready(q, sdev))
-		return true;
-
-	if (atomic_read(&sdev->device_busy) == 0 && !scsi_device_blocked(sdev))
-		blk_mq_delay_run_hw_queue(hctx, SCSI_QUEUE_DELAY);
-	return false;
+	return scsi_dev_queue_ready(q, sdev);
 }
 
 static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
-- 
2.26.0.292.g33ef6b2f38-goog


      parent reply	other threads:[~2020-04-07 22:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 22:00 [PATCH v3 0/4] blk-mq: Fix two causes of IO stalls found in reboot testing Douglas Anderson
2020-04-07 22:00 ` [PATCH v3 1/4] blk-mq: In blk_mq_dispatch_rq_list() "no budget" is a reason to kick Douglas Anderson
2020-04-07 22:00 ` [PATCH v3 2/4] blk-mq: Add blk_mq_delay_run_hw_queues() API call Douglas Anderson
2020-04-07 22:00 ` [PATCH v3 3/4] blk-mq: Rerun dispatching in the case of budget contention Douglas Anderson
2020-04-08  2:09   ` Ming Lei
2020-04-08  2:17     ` Doug Anderson
2020-04-08  3:06       ` Ming Lei
2020-04-08  4:11         ` Doug Anderson
2020-04-08  7:36           ` Ming Lei
2020-04-08 15:05             ` Doug Anderson
2020-04-07 22:00 ` Douglas Anderson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200407145906.v3.4.I630e6ca4cdcf9ab13ea899274745f9e3174eb12b@changeid \
    --to=dianders@chromium.org \
    --cc=axboe@kernel.dk \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    --cc=paolo.valente@linaro.org \
    --cc=sqazi@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.