public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Kashyap Desai <kashyap.desai@broadcom.com>
To: Hannes Reinecke <hare@suse.de>, linux-scsi@vger.kernel.org
Cc: jejb@linux.ibm.com, martin.petersen@oracle.com,
	Steve Hagan <steve.hagan@broadcom.com>,
	Peter Rivera <peter.rivera@broadcom.com>,
	mpi3mr-drvr-developers <mpi3mr-linuxdrv.pdl@broadcom.com>,
	Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>
Subject: RE: [PATCH v3 04/24] mpi3mr: add support of queue command processing
Date: Tue, 27 Apr 2021 22:14:55 +0530	[thread overview]
Message-ID: <112865784f146b4a12eca750e017547b@mail.gmail.com> (raw)
In-Reply-To: <128bcfe2-cd96-f90d-690e-8f2d075279e6@suse.de>

[-- Attachment #1: Type: text/plain, Size: 2895 bytes --]

> > +/**
> > + * mpi3mr_scmd_from_host_tag - Get SCSI command from host tag
> > + * @mrioc: Adapter instance reference
> > + * @host_tag: Host tag
> > + * @qidx: Operational queue index
> > + *
> > + * Identify the block tag from the host tag and queue index and
> > + * retrieve associated scsi command using scsi_host_find_tag().
> > + *
> > + * Return: SCSI command reference or NULL.
> > + */
> > +static struct scsi_cmnd *mpi3mr_scmd_from_host_tag(
> > +	struct mpi3mr_ioc *mrioc, u16 host_tag, u16 qidx) {
> > +	struct scsi_cmnd *scmd = NULL;
> > +	struct scmd_priv *priv = NULL;
> > +	u32 unique_tag = host_tag - 1;
> > +
> > +	if (WARN_ON(host_tag > mrioc->max_host_ios))
> > +		goto out;
> > +
> > +	unique_tag |= (qidx << BLK_MQ_UNIQUE_TAG_BITS);
> > +
> > +	scmd = scsi_host_find_tag(mrioc->shost, unique_tag);
> > +	if (scmd) {
> > +		priv = scsi_cmd_priv(scmd);
> > +		if (!priv->in_lld_scope)
> > +			scmd = NULL;
> > +	}
>
> That, I guess, is wrong.
>
> And 'real' unique tag (ie encoding the hwq num and the tag) only makes
> sense
> if you have _separate_ tag pools per queue.
> As your HBA supports only a single tag space _per HBA_ that would mean
> that
> you would have to _split_ that pool between hardware queues.

Hannes -

In current series, We have separate_ tag pools per queue.  There are two
stuffs in this driver/hw which is not matching with multiqueue support of
NVMe native.
1. Memory usage is too high and because of that we have segmented queue
support.
We are detecting queue full per operation queue which is unlikely event but
we wanted to keep it for some time. We will revisit this part once h/w
product goes under aggressive testing.
2. Whatever can_queue value H/W expose is not something per Operation queue,
but our h/w also do not break even though there are more than can_queue
command outstanding.
Actual outstanding per operation queue and controller wide in this h/w is
not very defined value, but it is too large (much higher higher than
can_queue) and we have considered this area to handle later.

> Which I don't think you do, as this would lead to a very imbalanced tag
> usage
> and ultimately a tag starvation on large systems.
> Hence each per-HWQ bitmap will cover the _full_ tag space, and the only
> way
> to make that work is to use shared hosttags.

In my initial study, I have noticed shared host tag is also giving similar
performance so we have plan to use shared host tag in future.
Doing this - We are strictly following can_queue level throttling in SML and
no matter how much max h/w really support.

Kashyap

>
> Cheers,
>
> Hannes
> --
> Dr. Hannes Reinecke		        Kernel Storage Architect
> hare@suse.de			               +49 911 74053 688
> SUSE Software Solutions Germany GmbH, 90409 Nürnberg
> GF: F. Imendörffer, HRB 36809 (AG Nürnberg)

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]

  reply	other threads:[~2021-04-27 16:45 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 11:01 [PATCH v3 00/24] Introducing mpi3mr driver Kashyap Desai
2021-04-19 11:01 ` [PATCH v3 01/24] mpi3mr: add mpi30 Rev-R headers and Kconfig Kashyap Desai
2021-04-23 13:02   ` Hannes Reinecke
2021-04-23 13:14     ` Kashyap Desai
2021-04-19 11:01 ` [PATCH v3 02/24] mpi3mr: base driver code Kashyap Desai
2021-04-23 13:13   ` Hannes Reinecke
2021-04-27 15:47     ` Kashyap Desai
2021-04-27 18:08       ` Hannes Reinecke
2021-04-19 11:01 ` [PATCH v3 03/24] mpi3mr: create operational request and reply queue pair Kashyap Desai
2021-04-21 17:05   ` Himanshu Madhani
2021-04-26 14:22   ` Hannes Reinecke
2021-04-19 11:01 ` [PATCH v3 04/24] mpi3mr: add support of queue command processing Kashyap Desai
2021-04-21 17:05   ` Himanshu Madhani
2021-04-26 15:12   ` Hannes Reinecke
2021-04-27 16:44     ` Kashyap Desai [this message]
2021-04-19 11:01 ` [PATCH v3 05/24] mpi3mr: add support of internal watchdog thread Kashyap Desai
2021-04-21 18:57   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 06/24] mpi3mr: add support of event handling part-1 Kashyap Desai
2021-04-19 17:54   ` Tomas Henzl
2021-04-21  6:49     ` Kashyap Desai
2021-04-21 20:25   ` Himanshu Madhani
2021-04-26 16:05   ` Hannes Reinecke
2021-05-11 18:34     ` Kashyap Desai
2021-04-19 11:01 ` [PATCH v3 07/24] mpi3mr: add support of event handling pcie devices part-2 Kashyap Desai
2021-04-21 20:31   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 08/24] mpi3mr: add support of event handling part-3 Kashyap Desai
2021-04-21 20:35   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 09/24] mpi3mr: add support for recovering controller Kashyap Desai
2021-04-21 20:59   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 10/24] mpi3mr: add support of timestamp sync with firmware Kashyap Desai
2021-04-21 21:08   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 11/24] mpi3mr: print ioc info for debugging Kashyap Desai
2021-04-22  2:24   ` Himanshu Madhani
2021-04-26 16:06   ` Hannes Reinecke
2021-05-11 18:35     ` Kashyap Desai
2021-04-19 11:01 ` [PATCH v3 12/24] mpi3mr: add bios_param shost template hook Kashyap Desai
2021-04-22  2:31   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 13/24] mpi3mr: implement scsi error handler hooks Kashyap Desai
2021-04-22 15:42   ` Himanshu Madhani
2021-04-26 16:10   ` Hannes Reinecke
2021-04-27 16:56     ` Kashyap Desai
2021-04-19 11:01 ` [PATCH v3 14/24] mpi3mr: add change queue depth support Kashyap Desai
2021-04-22 15:48   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 15/24] mpi3mr: allow certain commands during pci-remove hook Kashyap Desai
2021-04-22 15:49   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 16/24] mpi3mr: hardware workaround for UNMAP commands to nvme drives Kashyap Desai
2021-04-22 16:01   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 17/24] mpi3mr: add support of threaded isr Kashyap Desai
2021-04-22 17:08   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 18/24] mpi3mr: add complete support of soft reset Kashyap Desai
2021-04-22 17:16   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 19/24] mpi3mr: print pending host ios for debug Kashyap Desai
2021-04-22 17:17   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 20/24] mpi3mr: wait for pending IO completions upon detection of VD IO timeout Kashyap Desai
2021-04-22 17:22   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 21/24] mpi3mr: add support of PM suspend and resume Kashyap Desai
2021-04-22 17:24   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 22/24] mpi3mr: add support of DSN secure fw check Kashyap Desai
2021-04-22 17:27   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 23/24] mpi3mr: add eedp dif dix support Kashyap Desai
2021-04-22 17:42   ` Himanshu Madhani
2021-04-19 11:01 ` [PATCH v3 24/24] mpi3mr: add event handling debug prints Kashyap Desai
2021-04-22 17:45   ` Himanshu Madhani

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=112865784f146b4a12eca750e017547b@mail.gmail.com \
    --to=kashyap.desai@broadcom.com \
    --cc=hare@suse.de \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mpi3mr-linuxdrv.pdl@broadcom.com \
    --cc=peter.rivera@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=steve.hagan@broadcom.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