From: sashiko-bot@kernel.org
To: "Tejun Heo" <tj@kernel.org>
Cc: sched-ext@lists.linux.dev
Subject: Re: [PATCH 2/2] sched_ext: Maintain an online cid mask in the scheduler arena
Date: Tue, 15 Sep 2026 00:03:08 +0000 [thread overview]
Message-ID: <20260915000309.65BAF1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914234259.3585373-3-tj@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] cleanup: mixing goto-based error handling with scoped_guard
--
commit 60f284d9a4235976e8b99adae7dd47c5aa1ab1af
Author: Tejun Heo <tj@kernel.org>
Subject: sched_ext: Maintain an online cid mask in the scheduler arena
This commit adds a kernel-maintained online cid mask to the scheduler's
arena, which is allocated alongside per-CPU scratch masks. This mask is
updated during hotplug transitions, allowing custom-mapped schedulers to
accurately learn which cids are online without needing a restart.
> diff --git a/kernel/sched/ext/sub.c b/kernel/sched/ext/sub.c
> --- a/kernel/sched/ext/sub.c
> +++ b/kernel/sched/ext/sub.c
> @@ -1805,6 +1805,12 @@ void scx_sub_enable_workfn(struct kthread_work *work)
> goto err_disable;
> }
>
> + scoped_guard(cpus_read_lock) {
> + ret = scx_alloc_kern_arena_objs(sch);
> + if (ret)
> + goto err_disable;
[Severity: Low]
Does this code mix goto-based error handling with scope-based cleanup in
scx_sub_enable_workfn()?
The cleanup subsystem guidelines specify that functions should either convert
all resources that need a goto cleanup to scope-based cleanup, or convert
none of them. Mixing goto error labels (like goto err_disable) with
scoped_guard within the same function creates confusing ownership semantics.
> + }
> +
> if (sch->ops.init) {
> ret = SCX_CALL_OP_RET(sch, init, NULL);
> if (ret) {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914234259.3585373-1-tj@kernel.org?part=2
next prev parent reply other threads:[~2026-09-15 0:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 23:42 [PATCHSET sched_ext/for-7.3-fixes] sched_ext: Idle repick notifications and online cid mask Tejun Heo
2026-09-14 23:42 ` [PATCH 1/2] sched_ext: Fix idle state tracking across idle repicks Tejun Heo
2026-09-15 6:23 ` Andrea Righi
2026-09-15 8:02 ` Tejun Heo
2026-09-14 23:42 ` [PATCH 2/2] sched_ext: Maintain an online cid mask in the scheduler arena Tejun Heo
2026-09-15 0:03 ` sashiko-bot [this message]
2026-09-15 5:44 ` Andrea Righi
-- strict thread matches above, loose matches on Subject: below --
2026-09-15 8:27 [PATCHSET v2 sched_ext/for-7.3-fixes] sched_ext: Idle claim recovery and online cid mask Tejun Heo
2026-09-15 8:27 ` [PATCH 2/2] sched_ext: Maintain an online cid mask in the scheduler arena Tejun Heo
2026-09-15 8:58 ` sashiko-bot
2026-09-15 16:54 ` Tejun Heo
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=20260915000309.65BAF1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
/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