From: Tejun Heo <tj@kernel.org>
To: Cheng-Yang Chou <yphbchou0911@gmail.com>
Cc: sched-ext@lists.linux.dev, David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>,
Ching-Chun Huang <jserv@ccns.ncku.edu.tw>,
Chia-Ping Tsai <chia7712@gmail.com>,
chengyang.chou@mediatek.com
Subject: Re: [PATCH sched_ext/for-7.3] sched_ext: Replace open-coded event lists with SCX_EVENTS_LIST
Date: Mon, 29 Jun 2026 08:17:43 -1000 [thread overview]
Message-ID: <29d059023bf75cd5c40996d5384ed8aa@kernel.org> (raw)
In-Reply-To: <20260629143532.15014-1-yphbchou0911@gmail.com>
Hello,
On Mon, Jun 29, 2026 at 10:35:11PM +0800, Cheng-Yang Chou wrote:
> + const s64 *src = (const s64 *)&per_cpu_ptr(sch->pcpu, cpu)->event_stats;
> + s64 *dst = (s64 *)events;
> +
> + for (i = 0; i < NR_SCX_EVENTS; i++)
> + dst[i] += READ_ONCE(src[i]);
scx_read_events() can expand SCX_EVENTS_LIST() too, like the other two
sites:
struct scx_event_stats *e_cpu = &per_cpu_ptr(sch->pcpu, cpu)->event_stats;
#define SCX_EVENT(name) events->name += READ_ONCE(e_cpu->name)
SCX_EVENTS_LIST(SCX_EVENT);
#undef SCX_EVENT
That keeps all three sites consistent and lets you drop NR_SCX_EVENTS and
the s64 casts, which assume the struct stays a packed array of s64.
Thanks.
--
tejun
prev parent reply other threads:[~2026-06-29 18:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 14:35 [PATCH sched_ext/for-7.3] sched_ext: Replace open-coded event lists with SCX_EVENTS_LIST Cheng-Yang Chou
2026-06-29 18:17 ` Tejun Heo [this message]
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=29d059023bf75cd5c40996d5384ed8aa@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=chengyang.chou@mediatek.com \
--cc=chia7712@gmail.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=sched-ext@lists.linux.dev \
--cc=void@manifault.com \
--cc=yphbchou0911@gmail.com \
/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