From: sashiko-bot@kernel.org
To: "Tao Cui" <cui.tao@linux.dev>
Cc: bpf@vger.kernel.org, sched-ext@lists.linux.dev
Subject: Re: [PATCH] sched_ext: don't deliver duplicate ops.cgroup_set_idle() for same value
Date: Tue, 01 Sep 2026 03:22:40 +0000 [thread overview]
Message-ID: <20260901032240.929AA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260901031101.731943-1-cui.tao@linux.dev>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch references a non-existent struct member `tg->scx.sched_idle`, which causes a build failure.
--
commit b3dc4baced455427fac828517318398556404ffa
Author: Tao Cui <cuitao@kylinos.cn>
sched_ext: don't deliver duplicate ops.cgroup_set_idle() for same value
This commit modifies scx_group_set_idle() to prevent delivering duplicate
cgroup transition callbacks to the BPF scheduler. It checks if the new idle
value differs from the existing value before invoking the callback.
Link: https://lore.kernel.org/r/b53c61a1-4d7d-4232-941f-d48b0563d4ed
> diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
> index c539d15cda637..c72d9780830b8 100644
> --- a/kernel/sched/ext/ext.c
> +++ b/kernel/sched/ext/ext.c
> @@ -4930,7 +4930,8 @@ void scx_group_set_idle(struct task_group *tg, bool idle)
> percpu_down_read(&scx_cgroup_ops_rwsem);
> sch = scx_tg_knob_sched(tg);
>
> - if (scx_cgroup_enabled && sch && SCX_HAS_OP(sch, cgroup_set_idle))
> + if (scx_cgroup_enabled && sch && SCX_HAS_OP(sch, cgroup_set_idle) &&
> + tg->scx.sched_idle != idle)
[Severity: Low]
Does this code build successfully when CONFIG_EXT_GROUP_SCHED is enabled?
It appears tg->scx.sched_idle is referencing a non-existent member in
struct scx_task_group.
Looking at include/linux/sched/ext.h, the scx_task_group struct defines
the field simply as idle:
struct scx_task_group {
...
bool idle;
...
};
Should this condition check tg->scx.idle != idle instead?
> SCX_CALL_OP(sch, cgroup_set_idle, NULL, tg_cgrp(tg), idle);
>
> /* Update the task group's idle state */
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260901031101.731943-1-cui.tao@linux.dev?part=1
next prev parent reply other threads:[~2026-09-01 3:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 3:11 [PATCH] sched_ext: don't deliver duplicate ops.cgroup_set_idle() for same value Tao Cui
2026-09-01 3:22 ` sashiko-bot [this message]
2026-09-01 7:25 ` Andrea Righi
2026-09-01 12:35 ` 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=20260901032240.929AA1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cui.tao@linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sched-ext@lists.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