All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "hch@infradead.org" <hch@infradead.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"axboe@fb.com" <axboe@fb.com>,
	"jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"sagi@grimberg.me" <sagi@grimberg.me>
Subject: Re: [PATCH 2/6] SCSI: use blk_mq_run_hw_queues() in scsi_kick_queue()
Date: Wed, 12 Jul 2017 11:15:04 +0800	[thread overview]
Message-ID: <20170712031503.GG13036@ming.t460p> (raw)
In-Reply-To: <1499803071.2586.29.camel@wdc.com>

On Tue, Jul 11, 2017 at 07:57:53PM +0000, Bart Van Assche wrote:
> On Wed, 2017-07-12 at 02:20 +0800, Ming Lei wrote:
> > Now SCSI won't stop queue, and not necessary to use
> > blk_mq_start_hw_queues(), so switch to blk_mq_run_hw_queues()
> > instead.
> > 
> > Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
> > Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> > Cc: linux-scsi@vger.kernel.org
> > Signed-off-by: Ming Lei <ming.lei@redhat.com>
> > ---
> >  drivers/scsi/scsi_lib.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> > index f6097b89d5d3..91d890356b78 100644
> > --- a/drivers/scsi/scsi_lib.c
> > +++ b/drivers/scsi/scsi_lib.c
> > @@ -333,7 +333,7 @@ void scsi_device_unbusy(struct scsi_device *sdev)
> >  static void scsi_kick_queue(struct request_queue *q)
> >  {
> >  	if (q->mq_ops)
> > -		blk_mq_start_hw_queues(q);
> > +		blk_mq_run_hw_queues(q, false);
> >  	else
> >  		blk_run_queue(q);
> >  }
> 
> Hello Ming,
> 
> Now that we have separate flags to represent the "stopped" and "quiesced"
> states, wouldn't it be better not to modify scsi_kick_queue() but instead to
> stop a SCSI hardware queue again if scsi_queue_rq() returns BLK_STS_RESOURCE?
> See also commits 36e3cf273977 ("scsi: Avoid that SCSI queues get stuck") and
> commit 52d7f1b5c2f3 ("blk-mq: Avoid that requeueing starts stopped queues").

As you can see in the following patches, all stop/start queue APIs will
be removed, and the 'stopped' state will become a internal state.

It doesn't make sense to clear 'stopped' for scsi anymore, since the
queue won't be stopped actually. So we need this change.

-- 
Ming

  reply	other threads:[~2017-07-12  3:15 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-11 18:20 [PATCH 0/6] blk-mq: introduce congestion control Ming Lei
2017-07-11 18:20 ` [PATCH 1/6] xen-blkfront: avoid to use start/stop queue Ming Lei
2017-07-11 18:41   ` Konrad Rzeszutek Wilk
2017-07-11 18:41   ` Konrad Rzeszutek Wilk
2017-07-12  2:52     ` Ming Lei
2017-07-12  2:52     ` Ming Lei
2017-07-11 18:41   ` Bart Van Assche
2017-07-11 18:41   ` Bart Van Assche
2017-07-12  2:59     ` Ming Lei
2017-07-12  2:59     ` Ming Lei
2017-07-12  3:05     ` Ming Lei
2017-07-12  3:05     ` Ming Lei
2017-07-11 21:24   ` Roger Pau Monné
2017-07-12  3:12     ` Ming Lei
2017-07-12  3:12     ` Ming Lei
2017-07-11 21:24   ` Roger Pau Monné
2017-07-11 18:20 ` Ming Lei
2017-07-11 18:20 ` [PATCH 2/6] SCSI: use blk_mq_run_hw_queues() in scsi_kick_queue() Ming Lei
2017-07-11 19:57   ` Bart Van Assche
2017-07-11 19:57     ` Bart Van Assche
2017-07-12  3:15     ` Ming Lei [this message]
2017-07-12 15:12       ` Bart Van Assche
2017-07-12 15:12         ` Bart Van Assche
2017-07-13 10:23         ` Ming Lei
2017-07-13 17:44           ` Bart Van Assche
2017-07-13 17:44             ` Bart Van Assche
2017-07-11 18:21 ` [PATCH 3/6] blk-mq: send the request to dispatch list if direct issue returns busy Ming Lei
2017-07-11 20:18   ` Bart Van Assche
2017-07-12  3:45     ` Ming Lei
2017-07-11 18:21 ` [PATCH 4/6] blk-mq: use EWMA to estimate congestion threshold Ming Lei
2017-07-11 18:25   ` Jens Axboe
2017-07-12  2:30     ` Ming Lei
2017-07-12 15:39       ` Bart Van Assche
2017-07-13 10:43         ` Ming Lei
2017-07-13 14:56           ` Bart Van Assche
2017-07-13 15:32             ` Ming Lei
2017-07-13 17:35               ` Bart Van Assche
2017-07-11 18:39   ` Jens Axboe
2017-07-12  3:20     ` Ming Lei
2017-07-11 21:02   ` Bart Van Assche
2017-07-12  3:43     ` Ming Lei
2017-07-11 18:21 ` [PATCH 5/6] blk-mq: introduce basic congestion control Ming Lei
2017-07-11 18:21 ` [PATCH 6/6] blk-mq: unexport APIs for start/stop queues Ming Lei
  -- strict thread matches above, loose matches on Subject: below --
2017-07-14 23:15 [PATCH 0/6] blk-mq: cleanup start/stop queue Ming Lei
2017-07-14 23:15 ` [PATCH 2/6] SCSI: use blk_mq_run_hw_queues() in scsi_kick_queue() Ming Lei

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=20170712031503.GG13036@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=axboe@fb.com \
    --cc=hch@infradead.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sagi@grimberg.me \
    /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.