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: <DM6PR04MB657536A30C2F0C35CA50C71DFC609@DM6PR04MB6575.namprd04.prod.outlook.com>
Date:   Sat, 27 Mar 2021 08:02:41 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     Avri Altman <Avri.Altman@....com>, Can Guo <cang@...eaurora.org>
CC:     "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Bart Van Assche <bvanassche@....org>,
        yongmyung lee <ymhungry.lee@...sung.com>,
        Daejun Park <daejun7.park@...sung.com>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        Zang Leigang <zangleigang@...ilicon.com>,
        Avi Shchislowski <Avi.Shchislowski@....com>,
        Bean Huo <beanhuo@...ron.com>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>
Subject: RE: [PATCH v6 03/10] scsi: ufshpb: Add region's reads counter

> > > @@ -596,12 +615,43 @@ int ufshpb_prep(struct ufs_hba *hba, struct
> > > ufshcd_lrb *lrbp)
> > >               ufshpb_set_ppn_dirty(hpb, rgn_idx, srgn_idx, srgn_offset,
> > >                                transfer_len);
> > >               spin_unlock_irqrestore(&hpb->rgn_state_lock, flags);
> > > +
> > > +             if (hpb->is_hcm) {
> > > +                     spin_lock(&rgn->rgn_lock);
> > > +                     rgn->reads = 0;
> > > +                     spin_unlock(&rgn->rgn_lock);
> Here also.
> 
> > > +             }
> > > +
> > >               return 0;
> > >       }
> > >
> > >       if (!ufshpb_is_support_chunk(hpb, transfer_len))
> > >               return 0;
> > >
> > > +     if (hpb->is_hcm) {
> > > +             bool activate = false;
> > > +             /*
> > > +              * in host control mode, reads are the main source for
> > > +              * activation trials.
> > > +              */
> > > +             spin_lock(&rgn->rgn_lock);
> > > +             rgn->reads++;
> > > +             if (rgn->reads == ACTIVATION_THRESHOLD)
> > > +                     activate = true;
> > > +             spin_unlock(&rgn->rgn_lock);
> > > +             if (activate) {
> > > +                     spin_lock_irqsave(&hpb->rsp_list_lock, flags);
> > > +                     ufshpb_update_active_info(hpb, rgn_idx, srgn_idx);
> >
> > If a transfer_len (possible with HPB2.0) sits accross two
> > regions/sub-regions,
> > here it only updates active info of the first region/sub-region.
> Yes.  Will fix.
Giving it another look, I noticed that the current design only support a single subregion per region.
As activation is done per subregion, we need to count reads per subregion and make those activation decisions accordingly. 
Still, the read counter per region needs to stay, as well as its spinlock for the inactivation decision.

Will fix it in my next version.  Waiting for v32.

Thanks,
Avri

> 
> Thanks,
> Avri
> 
> >
> > Thanks,
> > Can Guo.
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ