[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1591869173.25636.39.camel@mtkswgap22>
Date: Thu, 11 Jun 2020 17:52:53 +0800
From: Stanley Chu <stanley.chu@...iatek.com>
To: Avri Altman <Avri.Altman@....com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"cang@...eaurora.org" <cang@...eaurora.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"bvanassche@....org" <bvanassche@....org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kuohong.wang@...iatek.com" <kuohong.wang@...iatek.com>,
"peter.wang@...iatek.com" <peter.wang@...iatek.com>,
"chun-hung.wu@...iatek.com" <chun-hung.wu@...iatek.com>,
"andy.teng@...iatek.com" <andy.teng@...iatek.com>,
"chaotian.jing@...iatek.com" <chaotian.jing@...iatek.com>,
"cc.chou@...iatek.com" <cc.chou@...iatek.com>
Subject: RE: [PATCH v4] scsi: ufs: Fix imprecise load calculation in devfreq
window
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@...iatek.com>
> Reviewed-by: Avri Altman <avri.altman@....com>
>
> 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
Powered by blists - more mailing lists