From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: 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>,
Omar Sandoval <osandov@fb.com>, Christoph Hellwig <hch@lst.de>,
Kashyap Desai <kashyap.desai@broadcom.com>,
Hannes Reinecke <hare@suse.de>,
Laurence Oberman <loberman@redhat.com>,
Bart Van Assche <bart.vanassche@wdc.com>
Subject: Re: [RFC PATCH V4 2/2] scsi: core: don't limit per-LUN queue depth for SSD
Date: Thu, 10 Oct 2019 08:43:29 +0800 [thread overview]
Message-ID: <20191010004328.GA23292@ming.t460p> (raw)
In-Reply-To: <75fe51d7-714f-8a51-89b5-aeeb7d318fdc@acm.org>
On Wed, Oct 09, 2019 at 09:05:26AM -0700, Bart Van Assche wrote:
> On 10/9/19 2:32 AM, Ming Lei wrote:
> > @@ -354,7 +354,8 @@ void scsi_device_unbusy(struct scsi_device *sdev, struct scsi_cmnd *cmd)
> > if (starget->can_queue > 0)
> > atomic_dec(&starget->target_busy);
> > - atomic_dec(&sdev->device_busy);
> > + if (!blk_queue_nonrot(sdev->request_queue))
> > + atomic_dec(&sdev->device_busy);
> > }
>
> Hi Ming,
>
> Does this patch impact the meaning of the queue_depth sysfs attribute (see
> also sdev_store_queue_depth()) and also the queue depth ramp up/down
> mechanism (see also scsi_handle_queue_ramp_up())? Have you considered to
This patch only ignores to track inflight SCSI commands on each
LUN, so it doesn't affect the meaning of sdev->queue_depth, which is
just bypassed for SSD.
> enable/disable busy tracking per LUN depending on whether or not
> sdev->queue_depth < shost->can_queue?
Yeah, we can do it, but that isn't contradictory with this patch, :-)
And we can do it even though sdev->queue_depth < shost->can_queue.
Usually sdev->queue_depth is used for the following reasons:
1) this limit isn't a hard limit, which may improve IO merge with cost
of IO latency.
2) fair dispatch among LUNs.
This patch just tries to not apply per-LUN queue depth for SSD, because:
1) fair dispatch has been done by blk-mq in allocating driver tag
2) IO merge doesn't play big role for SSD, and IO latency can be
increased by applying per-LUN queue depth.
3) NVMe doesn't apply per-ns queue depth
>
> The megaraid and mpt3sas drivers read sdev->device_busy directly. Is the
> current version of this patch compatible with these drivers?
For megaraid, sdev->device_busy is checked for choosing reply queue,
this way shouldn't be better than using default managed IRQ's mapping.
Similar usage is done on _base_get_high_iops_msix_index().
The only effect may be in scsih_dev_reset(), and 'SUCCESS' message
is dumped even though there is in-flight command on this LUN, but it
can be fixed easily.
Thanks,
Ming
next prev parent reply other threads:[~2019-10-10 0:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 9:32 [PATCH V4 0/2] scsi: avoid atomic operations in IO path Ming Lei
2019-10-09 9:32 ` [PATCH V4 1/2] scsi: core: avoid host-wide host_busy counter for scsi_mq Ming Lei
2019-10-09 16:14 ` Bart Van Assche
2019-10-23 8:52 ` John Garry
2019-10-24 0:58 ` Ming Lei
2019-10-24 9:19 ` John Garry
2019-10-24 21:24 ` Ming Lei
2019-10-25 8:58 ` John Garry
2019-10-25 9:43 ` Ming Lei
2019-10-25 10:13 ` John Garry
2019-10-25 21:53 ` Ming Lei
2019-10-28 9:42 ` John Garry
2019-10-09 9:32 ` [RFC PATCH V4 2/2] scsi: core: don't limit per-LUN queue depth for SSD Ming Lei
2019-10-09 16:05 ` Bart Van Assche
2019-10-10 0:43 ` Ming Lei [this message]
2019-10-17 18:30 ` Kashyap Desai
2019-10-23 1:28 ` Ming Lei
2019-10-23 7:46 ` Kashyap Desai
2019-10-24 1:09 ` Ming Lei
2019-10-25 10:04 ` Kashyap Desai
2019-10-25 21:58 ` Ming Lei
2019-11-04 9:30 ` Kashyap Desai
2019-11-05 0:23 ` Ming Lei
2019-10-23 0:30 ` [scsi] cc2f854c79: suspend_stress.fail kernel test robot
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=20191010004328.GA23292@ming.t460p \
--to=ming.lei@redhat.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=bvanassche@acm.org \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kashyap.desai@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=martin.petersen@oracle.com \
--cc=osandov@fb.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;
as well as URLs for NNTP newsgroup(s).