RE: [PATCH v4] scsi: ufs: Fix imprecise load calculation in devfreq window

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Avri,

Thanks for the review.

On Thu, 2020-06-11 at 08:03 +0000, Avri Altman wrote:
> > 
> > Fixes: a3cd5ec55f6c ("scsi: ufs: add load based scaling of UFS gear")
> > Signed-off-by: Stanley Chu <stanley.chu@xxxxxxxxxxxx>
> Reviewed-by: Avri Altman <avri.altman@xxxxxxx>
> 
> Just a small nit.
> 
> > -       stat->total_time = jiffies_to_usecs((long)jiffies -
> > -                               (long)scaling->window_start_t);
> > +       stat->total_time = ktime_to_us(curr_t) - scaling->window_start_t;
> ktime_sub ?

scaling->window_start_t is already in "us" thus ktime_sub() is not
suitable here.

Another way is changing scaling->window_start_t as type "ktime_t". This
is worth to do because of a little performance gain.

I will change it in next version.

Thanks,
Stanley Chu





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux