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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2038148563.21614676201654.JavaMail.epsvc@epcpadp3>
Date:   Tue, 02 Mar 2021 18:04:29 +0900
From:   Daejun Park <daejun7.park@...sung.com>
To:     Avri Altman <Avri.Altman@....com>,
        Daejun Park <daejun7.park@...sung.com>,
        "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>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Bart Van Assche <bvanassche@....org>,
        yongmyung lee <ymhungry.lee@...sung.com>,
        ALIM AKHTAR <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>,
        "cang@...eaurora.org" <cang@...eaurora.org>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>
Subject: RE: RE: [PATCH v4 7/9] scsi: ufshpb: Add "Cold" regions timer

Hi Avri,
> > 
> > Hi Avri,
> > 
> > > +static void ufshpb_read_to_handler(struct work_struct *work)
> > > +{
> > > +        struct delayed_work *dwork = to_delayed_work(work);
> > > +        struct ufshpb_lu *hpb;
> > > +        struct victim_select_info *lru_info;
> > > +        struct ufshpb_region *rgn;
> > > +        unsigned long flags;
> > > +        LIST_HEAD(expired_list);
> > > +
> > > +        hpb = container_of(dwork, struct ufshpb_lu, ufshpb_read_to_work);
> > > +
> > > +        if (test_and_set_bit(TIMEOUT_WORK_PENDING, &hpb-
> > >work_data_bits))
> > > +                return;
> > > +
> > > +        spin_lock_irqsave(&hpb->rgn_state_lock, flags);
> > > +
> > > +        lru_info = &hpb->lru_info;
> > > +
> > > +        list_for_each_entry(rgn, &lru_info->lh_lru_rgn, list_lru_rgn) {
> > > +                bool timedout = ktime_after(ktime_get(), rgn->read_timeout);
> > > +
> > > +                if (timedout) {
> > 
> > It is important not just to check the timeout, but how much time has passed.
> > If the time exceeded is twice the threshold, the read_timeout_expiries
> > value should be reduced by 2 instead of 1.
> Theoretically this shouldn't happened.
> Please note that POLLING_INTERVAL_MS << READ_TO_MS.
> Better add appropriate check when making those configurable.

OK, I agree.

Thanks,
Daejun

>  
> Thanks,
> Avri
> > 
> > > +                        rgn->read_timeout_expiries--;
> > 
> > Thanks,
> > Daejun
>  
>  
>  
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ