From: bot+bpf-ci@kernel.org
To: cui.tao@linux.dev,tj@kernel.org,josef@toxicopanda.com,axboe@kernel.dk
Cc: cgroups@vger.kernel.org,linux-block@vger.kernel.org,linux-kernel@vger.kernel.org,bpf@vger.kernel.org,andrii@kernel.org,eddyz87@gmail.com,ast@kernel.org,daniel@iogearbox.net,linux-kselftest@vger.kernel.org,cui.tao@linux.dev,cuitao@kylinos.cn,ameryhung@gmail.com,alexei.starovoitov@gmail.com,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [RFC PATCH v7 3/4] blk-iocost: add iocost_ioc_tick tracepoint for per-period device summary
Date: Thu, 24 Sep 2026 06:17:25 +0000 (UTC) [thread overview]
Message-ID: <0997af18f538770e776a2e2af287ccb144450b5da0108e6bdd0d849aa90353b4@mail.kernel.org> (raw)
In-Reply-To: <20260924054549.2271705-4-cui.tao@linux.dev>
[-- Attachment #1: Type: text/plain, Size: 2777 bytes --]
> diff --git a/block/blk-iocost.c b/block/blk-iocost.c
> index 21e4f8cbd9f2..a48751b6dbdd 100644
> --- a/block/blk-iocost.c
> +++ b/block/blk-iocost.c
[ ... ]
> diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h
> index e772b1bc60d6..32f19861a78f 100644
> --- a/include/trace/events/iocost.h
> +++ b/include/trace/events/iocost.h
> @@ -178,6 +178,51 @@ TRACE_EVENT(iocost_ioc_vrate_adj,
> )
> );
>
> +/*
> + * Periodic per-device summary, emitted once per period from the tail of
> + * ioc_timer_fn(). Unlike the state-change events above, this fires every
> + * period the controller is running, including steady states, and carries
> + * the overall controller state so basic monitoring doesn't require drgn.
> + */
> +TRACE_EVENT(iocost_ioc_tick,
> +
> + TP_PROTO(struct ioc *ioc, int nr_active, u64 usage_us_sum,
> + u32 tick_period_us, u64 tick_vrate,
> + int tick_busy, int tick_running, u64 tick_dur),
> +
> + TP_ARGS(ioc, nr_active, usage_us_sum, tick_period_us, tick_vrate,
> + tick_busy, tick_running, tick_dur),
> +
> + TP_STRUCT__entry (
> + __string(devname, ioc_name(ioc))
> + __field(u64, cur_period)
> + __field(u32, period_us)
> + __field(u64, vrate)
> + __field(int, busy_level)
> + __field(int, nr_active)
> + __field(u32, usage_pct)
> + __field(int, running)
> + ),
> +
> + TP_fast_assign(
> + __assign_str(devname);
> + __entry->cur_period = atomic64_read(&ioc->cur_period);
> + __entry->period_us = tick_period_us;
> + __entry->vrate = tick_vrate;
> + __entry->busy_level = tick_busy;
This isn't a bug, but since the ioc pointer is already passed and
cur_period is read from it inside TP_fast_assign, could period_us, vrate
and busy_level also be read from ioc here?
The neighbouring iocost_ioc_vrate_adj event reads ioc->vtime_base_rate
and ioc->busy_level directly from the ioc pointer in its TP_fast_assign.
Reading them directly would make this event's prototype consistent with
that pattern.
> + __entry->nr_active = nr_active;
> + __entry->usage_pct = tick_dur ?
> + div64_u64(usage_us_sum * 100, tick_dur) : 0;
> + __entry->running = tick_running;
> + ),
> +
> + TP_printk("[%s] period=%llu:%uus vrate=%llu busy=%d active=%d usage=%u%% running=%d",
> + __get_str(devname), __entry->cur_period, __entry->period_us,
> + __entry->vrate, __entry->busy_level, __entry->nr_active,
> + __entry->usage_pct, __entry->running
> + )
> +);
> +
> TRACE_EVENT(iocost_iocg_forgive_debt,
>
> TP_PROTO(struct ioc_gq *iocg, const char *path, struct ioc_now *now,
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/35962141400
next prev parent reply other threads:[~2026-09-24 6:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 5:45 [RFC PATCH v7 0/4] blk-iocost: BPF struct_ops cost model Tao Cui
2026-09-24 5:45 ` [RFC PATCH v7 1/4] blk-iocost: add BPF struct_ops cost model support Tao Cui
2026-09-24 6:30 ` bot+bpf-ci
2026-09-29 0:42 ` Tejun Heo
2026-09-29 13:42 ` Tao Cui
2026-09-29 16:27 ` Tejun Heo
2026-09-30 4:14 ` Tao Cui
2026-09-24 5:45 ` [RFC PATCH v7 2/4] selftests/bpf: add iocost cost model test Tao Cui
2026-09-24 6:30 ` bot+bpf-ci
2026-09-24 5:45 ` [RFC PATCH v7 3/4] blk-iocost: add iocost_ioc_tick tracepoint for per-period device summary Tao Cui
2026-09-24 6:17 ` bot+bpf-ci [this message]
2026-09-29 0:42 ` Tejun Heo
2026-09-29 13:46 ` Tao Cui
2026-09-24 5:45 ` [RFC PATCH v7 4/4] docs: cgroup-v2: document the iocost BPF cost model attachment Tao Cui
2026-09-29 0:42 ` [RFC PATCH v7 0/4] blk-iocost: BPF struct_ops cost model Tejun Heo
2026-09-29 13:39 ` Tao Cui
2026-09-29 16:27 ` Tejun Heo
2026-09-30 4:09 ` Tao Cui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0997af18f538770e776a2e2af287ccb144450b5da0108e6bdd0d849aa90353b4@mail.kernel.org \
--to=bot+bpf-ci@kernel.org \
--cc=alexei.starovoitov@gmail.com \
--cc=ameryhung@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=axboe@kernel.dk \
--cc=bpf@vger.kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=cui.tao@linux.dev \
--cc=cuitao@kylinos.cn \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=josef@toxicopanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=mason@kernel.org \
--cc=tj@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®