From: Ming Lei <ming.lei@redhat.com>
To: Damien Le Moal <Damien.LeMoal@wdc.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
Jens Axboe <axboe@kernel.dk>,
"Ewan D . Milne" <emilne@redhat.com>,
Kashyap Desai <kashyap.desai@broadcom.com>,
Hannes Reinecke <hare@suse.de>,
Bart Van Assche <bvanassche@acm.org>,
Long Li <longli@microsoft.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] scsi: core: only re-run queue in scsi_end_request() if device queue is busy
Date: Mon, 18 Nov 2019 08:47:21 +0800 [thread overview]
Message-ID: <20191118004721.GB30795@ming.t460p> (raw)
In-Reply-To: <BYAPR04MB5816F43072584F8F20EF4292E74D0@BYAPR04MB5816.namprd04.prod.outlook.com>
Hi Damine,
On Mon, Nov 18, 2019 at 12:18:48AM +0000, Damien Le Moal wrote:
> On 2019/11/17 17:08, Ming Lei wrote:
> > Now the requeue queue is run in scsi_end_request() unconditionally if both
> > target queue and host queue is ready. We should have re-run request queue
> > only after this device queue becomes busy for restarting this LUN only.
> >
> > Recently Long Li reported that cost of run queue may be very heavy in
> > case of high queue depth. So improve this situation by only running
> > requesut queue when this LUN is busy.
>
> s/requesut/request
>
> Also, shouldn't this patch have the tag:
>
> Reported-by: Long Li <longli@microsoft.com>
>
> ?
Will do that in V2.
>
> Another remark is that Long's approach is generic to the block layer
> while your patch here is scsi specific. I wonder if the same problem
> cannot happen with other drivers too ?
Not sure what you meant about the same problem.
It is definitely bad to unconditionally call blk_mq_run_hw_queues()
in driver's IO completion handler from performance viewpoint.
This patch simply addresses this SCSI specific issue, since blk_mq_run_hw_queues()
shouldn't be called from scsi_end_request() when the device queue isn't busy.
If other driver has such kind of issue, I believe it should have been fixed in
driver too.
So my patch isn't contradictory with Long's patch which improves generic blk-mq's
run queue.
Thanks,
Ming
next prev parent reply other threads:[~2019-11-18 0:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-17 8:08 [PATCH] scsi: core: only re-run queue in scsi_end_request() if device queue is busy Ming Lei
2019-11-18 0:18 ` Damien Le Moal
2019-11-18 0:47 ` Ming Lei [this message]
2019-11-18 1:10 ` Damien Le Moal
2019-11-18 2:46 ` Jens Axboe
2019-11-18 5:30 ` Bart Van Assche
2019-11-18 7:08 ` 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=20191118004721.GB30795@ming.t460p \
--to=ming.lei@redhat.com \
--cc=Damien.LeMoal@wdc.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=kashyap.desai@broadcom.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox