Re: [PATCH 4/5] blk-iocost: add iocost_ioc_tick tracepoint for per-period device summary

From: Tao Cui

Date: Thu Oct 29 2026 - 06:34:14 EST


Hello Tejun,

在 2026/10/29 04:09, Tejun Heo 写道:
> Hello, Tao.
>
> On Wed, Oct 28, 2026 at 10:35:33PM +0800, Tao Cui wrote:
>> u64 vdone, vtime, usage_us;
>> u32 hw_active, hw_inuse;
>>
>> + nr_active++;
>
> nr_active is counted even when the tracepoint is disabled.
>
Right. I'll only count nr_active when trace_iocost_ioc_tick_enabled()
is true.

>> + /*
>> + * Everything the tick reports is final here: busy_level was just
>> + * computed, cur_period hasn't changed, nr_active and usage_us_sum are
>> + * complete, and vrate and period_us still hold the values this period
>> + * ran in. usage is wall time over wall time, summed over iocgs, and is
>
> An io.cost.qos write in the middle of a period changes both period_us
> and vrate.
>
Right. I'll update the comment and the commit message to say that the
emission point has busy_level, cur_period, nr_active and
usage_us_sum complete, while vrate and period_us may already reflect a
later io.cost.qos update.

Thanks,
Tao

> Thanks.
>
> --
> tejun