Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Mike Christie <michael.christie@oracle.com>,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	james.bottomley@hansenpartnership.com,
	virtualization@lists.linux.dev, mst@redhat.com,
	pbonzini@redhat.com, stefanha@redhat.com, eperezma@redhat.com
Subject: Re: [PATCH 1/4] scsi: Fix can_queue comments
Date: Mon, 20 Apr 2026 09:28:35 +0100	[thread overview]
Message-ID: <5c33e4af-0708-479b-92f3-e98c051f92e2@oracle.com> (raw)
In-Reply-To: <20260417230751.117836-2-michael.christie@oracle.com>

On 17/04/2026 23:57, Mike Christie wrote:
> The Scsi_Host can_queue comment assumes the old pre-mq can_queue use or
> it assumed host_tagset is set. This syncs the scsi_host_template and
> Scsi_Host comment so they are in sync.
> 
> It also redirects the nr_hw_queues comment to can_queue so we only
> have to describe how can_queue and nr_hw_queues are related in one
> place.
> 
> I also dropped the non-interrupt vs interrupt driven comment because it
> doesn't seem to apply anymore.
> 
> Signed-off-by: Mike Christie <michael.christie@oracle.com>

Regardless of some nitpicking:
Reviewed-by: John Garry <john.g.garry@oracle.com>

> ---
>   include/scsi/scsi_host.h | 21 +++++++++------------
>   1 file changed, 9 insertions(+), 12 deletions(-)
> 
> diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
> index f6e12565a81d..7c747b566bc3 100644
> --- a/include/scsi/scsi_host.h
> +++ b/include/scsi/scsi_host.h
> @@ -381,10 +381,13 @@ struct scsi_host_template {
>   	const char *proc_name;
>   
>   	/*
> -	 * This determines if we will use a non-interrupt driven
> -	 * or an interrupt driven scheme.  It is set to the maximum number
> -	 * of simultaneous commands a single hw queue in HBA will accept
> -	 * excluding internal commands.
> +	 * If host_tagset is set, this is the maximum number of simultaneous
> +	 * commands the host will accept excluding internal commands.

nit: I'd have "... simultaneous commands the host will accept excluding 
internal commands over all HW queues".

> +	 *
> +	 * If host_tagset is not set, this is the maximum number simultaneous
> +	 * commands a single hw queue in the host will accept excluding
> +	 * internal commands. In other words, the total queue depth per host
> +	 * is nr_hw_queues * can_queue.
>   	 */
>   	int can_queue;
>   
> @@ -631,10 +634,7 @@ struct Scsi_Host {
>   
>   	int this_id;
>   
> -	/*
> -	 * Number of commands this host can handle at the same time.
> -	 * This excludes reserved commands as specified by nr_reserved_cmds.
> -	 */
> +	/* See scsi_host_template's can_queue. */
>   	int can_queue;
>   	/*
>   	 * Number of reserved commands to allocate, if any.
> @@ -653,10 +653,7 @@ struct Scsi_Host {
>   	/*
>   	 * In scsi-mq mode, the number of hardware queues supported by the LLD.

I think that this scsi-mq comment can be removed or fixed, as we have 
not had a separate mq mode in some time. I can do that as a separate 
change if you like.

>   	 *
> -	 * Note: it is assumed that each hardware queue has a queue depth of
> -	 * can_queue. In other words, the total queue depth per host
> -	 * is nr_hw_queues * can_queue. However, for when host_tagset is set,
> -	 * the total queue depth is can_queue.
> +	 * See scsi_host_template's can_queue for queueing requirements.

nit: I am not sure if we even need to mention this. By default, people 
would or should reference scsi_host_template

>   	 */
>   	unsigned nr_hw_queues;
>   	unsigned nr_maps;


  reply	other threads:[~2026-04-20  8:28 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 [this message]
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

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=5c33e4af-0708-479b-92f3-e98c051f92e2@oracle.com \
    --to=john.g.garry@oracle.com \
    --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