Re: [PATCH v2] block: make iolatency avg_lat exponentially decay

From: Tejun Heo
Date: Wed Aug 01 2018 - 11:50:04 EST


Hello,

On Tue, Jul 31, 2018 at 05:25:59PM -0700, Dennis Zhou wrote:
...
> + /*
> + * CALC_LOAD takes in a number stored in fixed point representation.
> + * Because we are using this for IO time in ns, the values stored
> + * are significantly larger than the FIXED_1 denominator (2048).
> + * Therefore, rounding errors in the calculation are negligible and
> + * can be ignored.
> + */
> + exp_idx = min_t(int, BLKIOLATENCY_NR_EXP_FACTORS - 1,
> + iolat->cur_win_nsec / BLKIOLATENCY_EXP_BUCKET_SIZE);

Build bot is complaining about naked 64bit div. Should use one of the
div64*() helpers.

Looks good to me. Once Johannes's concerns are addressed, please feel
free to add

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun