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

From: Tao Cui

Date: Fri Oct 02 2026 - 10:30:02 EST


Hello, Tejun.

在 2026/10/1 08:20, Tejun Heo 写道:
> Hello, Tao.
>
> The following is a Claude-generated review.
>
> On Wed, 30 Sep 2026 15:51:53 +0800, Tao Cui wrote:
>> Add iocost_ioc_tick, emitted once per period from the tail of
>> ioc_timer_fn() with the overall controller state: period_us, vrate,
>> busy_level, active iocg count, usage percentage and running state.
>> It fires every period the controller is running, including steady
>> states, plus one final tick before the controller goes idle, which
>> makes dormancy (e.g. a device saturated entirely by uncharged IO)
>> directly visible.
> ...
>> + __entry->running = ioc->running;
>
> The timer only runs while ioc->running is IOC_RUNNING and the switch to
> IOC_IDLE happens after the trace call, so this field always reads running
> except when racing ioc_rqos_exit(). The final tick before going idle
> reads active=0 running=1, and dormancy is only visible through the ticks
> stopping, not through the field. Can you either drop the field or report
> list_empty(&ioc->active_iocgs), and adjust the description? The event is
> also emitted before the vrate adjustment and the period transition, not
> from the tail of the function.
>

Done. The field now reports whether the active_iocgs list is empty,
rather than ioc->running, so the final tick directly reflects the
transition to dormancy. The description is updated accordingly: the
event is emitted before the vrate adjustment and the period
transition, not from the tail of ioc_timer_fn().

Thanks.
Tao

> Thanks.
>
> --
> tejun