mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Avri Altman <avri.altman@wdc.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Asutosh Das <quic_asutoshd@quicinc.com>,
	quic_cang@quicinc.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH v2] scsi: ufs: mcq: Limit the amount of inflight requests
Date: Mon, 3 Apr 2023 09:52:33 +0100	[thread overview]
Message-ID: <989d6e48-c440-5bf3-6fef-c0c76fdfc3ca@oracle.com> (raw)
In-Reply-To: <20230331074650.75-1-avri.altman@wdc.com>

On 31/03/2023 08:46, Avri Altman wrote:
> in UFS, each request is designated via the triplet <iid, lun, task tag>.
> 
> In UFS4.0 the Initiator ID field is 8 bits wide, comprised of the
> EXT_IID and IID fields. Together with the task tag (single byte), they
> limit the driver's hw queues capacity.
> 
> ---
> v1 -> v2:
> Attend Johannes's and Bart's comments
> 
> Signed-off-by: Avri Altman <avri.altman@wdc.com>
> ---
>   drivers/ufs/core/ufshcd.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 35a3bd95c5e4..cac7c9918c5b 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -8468,6 +8468,11 @@ static int ufshcd_alloc_mcq(struct ufs_hba *hba)
>   	if (ret)
>   		goto err;
>   
> +	if (hba->nutrs * hba->nr_hw_queues > SZ_64K - 1) {

If shost->host_tagset is set - which it seems to be for this driver - 
then the number of HW queues would not influence how many IOs the host 
may be sent. Rather this is just limited by just the HW queue depth.

Thanks,
John

> +		dev_info(hba->dev, "there can be at most 64K inflight requests\n");
> +		goto err;
> +	}
> +
>   	/*
>   	 * Previously allocated memory for nutrs may not be enough in MCQ mode.
>   	 * Number of supported tags in MCQ mode may be larger than SDB mode.


  parent reply	other threads:[~2023-04-03  8:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31  7:46 Avri Altman
2023-03-31  8:04 ` Johannes Thumshirn
2023-04-03  6:11 ` Dan Carpenter
2023-04-20  9:59   ` Avri Altman
2023-04-03  8:52 ` John Garry [this message]
2023-04-20 10:06   ` Avri Altman

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=989d6e48-c440-5bf3-6fef-c0c76fdfc3ca@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_cang@quicinc.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

all inboxes | Powered by JetHome®