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

Bart Van Assche
2020-01-02T21:07:10Z

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?
> 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.

Thanks,

Bart.