From: Hannes Reinecke <hare@suse.de>
To: Bart Van Assche <bvanassche@acm.org>,
Mike Christie <michael.christie@oracle.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
james.bottomley@hansenpartnership.com,
virtualization@lists.linux.dev, mst@redhat.com,
pbonzini@redhat.com, eperezma@redhat.com
Subject: Re: [PATCH 0/4] scsi: Support devices that don't have a cmd_per_lun limit
Date: Fri, 24 Apr 2026 07:45:31 +0200 [thread overview]
Message-ID: <ba82106e-ee68-43e2-93da-bb215fc26acc@suse.de> (raw)
In-Reply-To: <39585b28-64d8-42a4-afab-a88ca1eb83b6@acm.org>
On 4/23/26 18:40, Bart Van Assche wrote:
> On 4/23/26 2:45 AM, Hannes Reinecke wrote:
>> Ideally I would kill cmd_per_lun.
>> This really is a poor man's fairness algorithm (sole purpose is to
>> avoid starvation with many luns), and we really should look at if
>> we cannot replace it with tagsets.
>
> Hmm ... isn't cmd_per_lun essential since the introduction of scsi-mq?
> Without a host-wide tagset, and with n hardware queues,
> blk_mq_alloc_tag_set() allocates (number of hardware queues) *
> (shost->can_queue + shost->nr_reserved_cmds) requests. Each request
> maps to one SCSI command. Setting cmd_per_lun to shost->can_queue may
> be essential to avoid BUSY responses from a SCSI device. Here is an
> example from the ib_srp driver (there are many more SCSI LLDs that
> follow this pattern):
> * During connection establishment, the SCSI target reports the
> maximum queue depth it supports. This response is used to initialize
> can_queue and cmd_per_lun.
> * Multiple hardware queues are allocated, all supporting can_queue
> commands.
> * cmd_per_lun is set to can_queue to avoid BUSY responses from the SCSI
> target. My experience is that for high performance SCSI targets even
> 1% BUSY responses cause a significant performance drop.
>
My point being that cmd_per_lun is a single setting, and is extremely
imprecise. At the same time we already have fine-grained request QoS
available by virtue of tagsets.
Seems like we need to have a 'device_tagset' setting, too.
Hmm.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
prev parent reply other threads:[~2026-04-24 5:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 22:57 [PATCH 0/4] scsi: Support devices that don't have a cmd_per_lun limit Mike Christie
2026-04-17 22:57 ` [PATCH 1/4] scsi: Fix can_queue comments Mike Christie
2026-04-20 8:28 ` John Garry
2026-04-17 22:57 ` [PATCH 2/4] scsi: qedi: Fix command overqueueing Mike Christie
2026-04-20 16:45 ` Bart Van Assche
2026-04-20 17:47 ` Mike Christie
2026-04-20 18:02 ` Bart Van Assche
2026-04-20 18:48 ` Mike Christie
2026-04-17 22:57 ` [PATCH 3/4] scsi: Support scsi_devices without a device wide limit Mike Christie
2026-04-20 16:51 ` Bart Van Assche
2026-04-22 13:15 ` Hannes Reinecke
2026-04-22 18:06 ` Mike Christie
2026-04-23 10:02 ` John Garry
2026-04-23 10:32 ` Hannes Reinecke
2026-04-27 1:33 ` Martin K. Petersen
2026-04-17 22:57 ` [PATCH 4/4] virtio-scsi: " Mike Christie
2026-04-20 17:30 ` Stefan Hajnoczi
2026-04-20 17:37 ` Bart Van Assche
2026-04-20 17:33 ` [PATCH 0/4] scsi: Support devices that don't have a cmd_per_lun limit Stefan Hajnoczi
2026-04-22 18:05 ` Mike Christie
2026-04-23 9:45 ` Hannes Reinecke
2026-04-23 16:40 ` Bart Van Assche
2026-04-24 5:45 ` Hannes Reinecke [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=ba82106e-ee68-43e2-93da-bb215fc26acc@suse.de \
--to=hare@suse.de \
--cc=bvanassche@acm.org \
--cc=eperezma@redhat.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux.dev \
/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