lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR04MB657568B03233E8CA7DF4BC6AFC639@DM6PR04MB6575.namprd04.prod.outlook.com>
Date:   Thu, 20 Apr 2023 10:06:13 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     John Garry <john.g.garry@...cle.com>,
        "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>
CC:     Asutosh Das <quic_asutoshd@...cinc.com>,
        "quic_cang@...cinc.com" <quic_cang@...cinc.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Johannes Thumshirn <Johannes.Thumshirn@....com>,
        Bart Van Assche <bvanassche@....org>
Subject: RE: [PATCH v2] scsi: ufs: mcq: Limit the amount of inflight requests

 
> 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@....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.
The purpose of this patch is merely to document the ufs spec restrictions.
practically, it impose no functional change.
I will elaborate the commit log accordingly.

Thanks,
Avri

> 
> 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ