Re: [PATCH v6 07/25] rtrs: client: statistics functions

Jinpu Wang
2020-01-03T14:39:46Z

On Thu, Jan 2, 2020 at 10:07 PM Bart Van Assche <bvanassche@acm.org> wrote:
>
> On 12/30/19 2:29 AM, Jack Wang wrote:
> > From: Jack Wang <jinpu.wang@cloud.ionos.com>
> >
> > This introduces set of functions used on client side to account
> > statistics of RDMA data sent/received, amount of IOs inflight,
> > latency, cpu migrations, etc. Almost all statistics is collected
> ^^
> are?
will fix.
> > using percpu variables.
> > [ ... ]
> > +static inline int rtrs_clt_ms_to_id(unsigned long ms)
> > +{
> > + int id = ms ? ilog2(ms) - MIN_LOG_LAT + 1 : 0;
> > +
> > + return clamp(id, 0, LOG_LAT_SZ - 1);
> > +}
>
> I think it is unusual to call the returned value an "id" in this
> context. How about changing "id" into "bin" or "bucket"? See also
> https://en.wikipedia.org/wiki/Histogram.
will rename id to bin
>
> Thanks,
>
> Bart.
Thanks