From: Bart Van Assche <bart.vanassche@gmail.com>
To: Damien Le Moal <dlemoal@kernel.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
John Garry <john.g.garry@oracle.com>,
Hannes Reinecke <hare@suse.de>,
Christoph Hellwig <hch@infradead.org>,
Jens Axboe <axboe@kernel.dk>, Ming Lei <ming.lei@redhat.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v4 6/6] scsi: core: Improve IOPS in case of host-wide tags
Date: Fri, 19 Dec 2025 16:28:47 -0800 [thread overview]
Message-ID: <02a6cf4b-62e7-4361-ac95-533da18f7ffa@gmail.com> (raw)
In-Reply-To: <52e2f607-f4a6-49ff-9a52-db382333ea69@kernel.org>
On 12/19/25 4:13 PM, Damien Le Moal wrote:
> E.g.: "host->can_queue is identical to the maximum queue depth per
> logical unit" -> As I mentioned, SCSI does not define/advertize a maximum queue
> depth per LU (beside the transport defined maximum of course). So Is this
> something that UFS defines outside of SCSI/SBC ?
No, this is something that is supported since a long time by the Linux
kernel. scsi_alloc_sdev() uses host->cmd_per_lun when allocating the
SCSI device budget map. Hence, host->cmd_per_lun is the maximum queue
depth for a SCSI device. This limit is enforced since a very long time.
Before the budget map was introduced, the number of commands per SCSI
device was set as follows:
scsi_change_queue_depth(sdev, sdev->host->cmd_per_lun ?: 1);
> Also, for UFS, is it always one
> host per LU ? (that would be odd, the "device" here should be the host and you
> say it can have multiple LUs).
No. There is one SCSI host per UFS device and there can be multiple
logical units per UFS device.
> But if I understand this correctly, you are saying that a UFS device is like
> SATA and can_queue == device max queue depth, so we are always guaranteed that
> if you can allocate a tag, you will be able to issue the command, right ?
That's correct.
Thanks,
Bart.
prev parent reply other threads:[~2025-12-20 0:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 22:30 [PATCH v4 0/6] Increase SCSI IOPS Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 1/6] block: Rename busy_tag_iter_fn into blk_mq_rq_iter_fn Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 2/6] block: Introduce __blk_mq_tagset_iter() Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 3/6] block: Introduce blk_mq_tagset_iter() Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 4/6] ata: libata: Set .needs_budget_token Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 5/6] scsi: core: Generalize scsi_device_busy() Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 6/6] scsi: core: Improve IOPS in case of host-wide tags Bart Van Assche
2025-12-17 3:24 ` Damien Le Moal
2025-12-19 17:35 ` Bart Van Assche
2025-12-19 23:06 ` Damien Le Moal
2025-12-20 0:05 ` Bart Van Assche
2025-12-20 0:13 ` Damien Le Moal
2025-12-20 0:28 ` Bart Van Assche [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=02a6cf4b-62e7-4361-ac95-533da18f7ffa@gmail.com \
--to=bart.vanassche@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=john.g.garry@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.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