From: sashiko-bot@kernel.org
To: "Tejun Heo" <tj@kernel.org>
Cc: sched-ext@lists.linux.dev
Subject: Re: [PATCH 11/12] sched_ext: scx_qmap - Idle-check pinned tasks before direct dispatch
Date: Sat, 01 Aug 2026 09:06:43 +0000 [thread overview]
Message-ID: <20260801090644.47EB11F00AC4@smtp.kernel.org> (raw)
In-Reply-To: <20260801085150.2697653-12-tj@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The BPF rodata variable `always_enq_immed` was made unused by the patch and remains as dead code.
--
--- Patch [11]: [PATCH 11/12] sched_ext: scx_qmap - Idle-check pinned tasks before direct dispatch ---
commit 8281293388fde26e27e2d80b5bd65cbae1161f07
Author: Tejun Heo <tj@kernel.org>
sched_ext: scx_qmap - Idle-check pinned tasks before direct dispatch
This commit updates pick_direct_dispatch_cid() to perform idle checks on
pinned tasks before direct dispatching. Previously, pinned tasks were sent
straight to their only CPU without an idle check, which could lead to bounce
loops if the CPU was busy.
> diff --git a/tools/sched_ext/scx_qmap.bpf.c b/tools/sched_ext/scx_qmap.bpf.c
> index 8822ed11c0d8b..9a0321e84e88f 100644
> --- a/tools/sched_ext/scx_qmap.bpf.c
> +++ b/tools/sched_ext/scx_qmap.bpf.c
> @@ -230,9 +230,6 @@ static s32 pick_direct_dispatch_cid(struct task_struct *p, s32 prev_cid,
> s32 cid;
> u32 i;
>
> - if (!always_enq_immed && p->nr_cpus_allowed == 1)
> - return prev_cid;
> -
[Severity: Low]
With the removal of this check, the BPF rodata variable always_enq_immed is
no longer read anywhere in the BPF program.
Should the declaration and its userspace assignment also be removed to clean
up the remaining dead code?
tools/sched_ext/scx_qmap.bpf.c:
const volatile bool always_enq_immed;
tools/sched_ext/scx_qmap.c:main()
...
case 'I':
skel->rodata->always_enq_immed = true;
...
> if (cmask_test(prev_cid, &qa.self_cids.mask) &&
> cmask_test_and_clear(prev_cid, &qa.idle_cids.mask))
> return prev_cid;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260801085150.2697653-1-tj@kernel.org?part=11
next prev parent reply other threads:[~2026-08-01 9:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-01 8:51 [PATCHSET sched_ext/for-7.3] sched_ext: Bandwidth-limited rescue execution for stranded tasks Tejun Heo
2026-08-01 8:51 ` [PATCH 01/12] sched_ext: Rename scx_local_or_reject_dsq() to scx_resolve_local_dsq() Tejun Heo
2026-08-01 8:51 ` [PATCH 02/12] sched_ext: Make several ext.c helpers available outside ext.c Tejun Heo
2026-08-01 8:58 ` sashiko-bot
2026-08-01 8:51 ` [PATCH 03/12] sched_ext: Factor out __scx_bpf_now() Tejun Heo
2026-08-01 8:51 ` [PATCH 04/12] sched_ext: Reject internal enq_flags in the dsq move kfuncs Tejun Heo
2026-08-01 8:51 ` [PATCH 05/12] sched_ext: Make SCX_ENQ_IGNORE_CAPS waive the preemption cap too Tejun Heo
2026-08-01 8:51 ` [PATCH 06/12] sched_ext: Synchronize slice and dsq_vtime writes Tejun Heo
2026-08-01 8:51 ` [PATCH 07/12] sched_ext: Add SCX_TASK_PROTECTED Tejun Heo
2026-08-01 8:51 ` [PATCH 08/12] sched_ext: Add bandwidth-limited rescue execution for stranded tasks Tejun Heo
2026-08-01 8:51 ` [PATCH 09/12] sched_ext: Eject the top rescue consumer on overload Tejun Heo
2026-08-01 9:11 ` sashiko-bot
2026-08-01 8:51 ` [PATCH 10/12] sched_ext: Sync tools autogen enum headers Tejun Heo
2026-08-01 8:51 ` [PATCH 11/12] sched_ext: scx_qmap - Idle-check pinned tasks before direct dispatch Tejun Heo
2026-08-01 9:06 ` sashiko-bot [this message]
2026-08-01 8:51 ` [PATCH 12/12] sched_ext: scx_qmap - Add rescue support Tejun Heo
2026-08-01 9:06 ` sashiko-bot
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=20260801090644.47EB11F00AC4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.