From: sashiko-bot@kernel.org
To: "Andrea Righi" <arighi@nvidia.com>
Cc: sched-ext@lists.linux.dev
Subject: Re: [PATCH 10/11] sched_ext: scx_qmap: Add proxy execution support
Date: Thu, 16 Jul 2026 15:54:12 +0000 [thread overview]
Message-ID: <20260716155412.7DA841F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260716132229.61603-11-arighi@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Redundant !(enq_flags & SCX_ENQ_REENQ) checks left behind after moving the early return handler.
--
--- Patch [10]: [PATCH 10/11] sched_ext: scx_qmap: Add proxy execution support ---
commit fb0f1d9957f7124711aadbe323f38da6fa6e3857
Author: Andrea Righi <arighi@nvidia.com>
sched_ext: scx_qmap: Add proxy execution support
This commit adds a -B option to scx_qmap to opt into queueing mutex-blocked
tasks for proxy execution. It dispatches blocked donors directly to the
local DSQ of their current cid with a fresh slice and SCX_ENQ_PREEMPT.
> diff --git a/tools/sched_ext/scx_qmap.bpf.c b/tools/sched_ext/scx_qmap.bpf.c
> index 09aee49120c28..ab14325a07b6d 100644
> --- a/tools/sched_ext/scx_qmap.bpf.c
> +++ b/tools/sched_ext/scx_qmap.bpf.c
> @@ -451,6 +451,40 @@ void BPF_STRUCT_OPS(qmap_enqueue, struct task_struct *p, u64 enq_flags)
> */
> taskc->core_sched_seq = qa.core_sched_tail_seqs[idx]++;
>
> + /*
> + * If the task was re-enqueued due to the CPU being preempted by a
> + * higher priority scheduling class, just re-enqueue the task directly
> + * on the global DSQ. As we want another CPU to pick it up, find and
> + * kick an idle cid.
> + */
> + if (enq_flags & SCX_ENQ_REENQ) {
> + taskc->force_local = false;
> + scx_bpf_dsq_insert(p, SHARED_DSQ, 0, enq_flags);
> + cid = cmask_next_and2_set_wrap(&taskc->cpus_allowed,
> + &qa.idle_cids.mask,
> + &qa.self_cids.mask, 0);
> + if (cid < scx_bpf_nr_cids())
> + scx_bpf_kick_cid(cid, SCX_KICK_IDLE);
> + return;
> + }
[Severity: Low]
Since the early return block for SCX_ENQ_REENQ was moved higher up in
qmap_enqueue(), are the later checks for !(enq_flags & SCX_ENQ_REENQ)
now redundant?
For example, further down in the same function:
if (qa.nr_sub_scheds && !(enq_flags & SCX_ENQ_REENQ) &&
!cmask_intersects(&taskc->cpus_allowed, &qa.self_cids.mask)) {
It seems SCX_ENQ_REENQ will never be set when reaching this code now, making
the condition safely removable.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260716132229.61603-1-arighi@nvidia.com?part=10
next prev parent reply other threads:[~2026-07-16 15:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 13:20 [PATCHSET v7 sched_ext/for-7.3] sched: Make proxy execution compatible with sched_ext Andrea Righi
2026-07-16 13:20 ` [PATCH 01/11] sched: Make NOHZ CFS bandwidth checks follow proxy donor Andrea Righi
2026-07-16 13:20 ` [PATCH 02/11] sched: Add helper to block retained proxy donors Andrea Righi
2026-07-16 13:20 ` [PATCH 03/11] sched_ext: Block proxy donors across scheduler transitions Andrea Righi
2026-07-16 13:20 ` [PATCH 04/11] sched_ext: Fix ops.running/stopping() pairing for proxy-exec donors Andrea Righi
2026-07-16 13:20 ` [PATCH 05/11] sched_ext: Fix TOCTOU race in consume_remote_task() Andrea Righi
2026-07-16 14:39 ` sashiko-bot
2026-07-16 21:29 ` Tejun Heo
2026-07-16 13:20 ` [PATCH 06/11] sched_ext: Split curr|donor references properly Andrea Righi
2026-07-16 15:02 ` sashiko-bot
2026-07-16 13:20 ` [PATCH 07/11] sched_ext: Handle blocked donor migration with proxy execution Andrea Righi
2026-07-16 15:22 ` sashiko-bot
2026-07-16 13:20 ` [PATCH 08/11] sched_ext: Delegate proxy donor admission to BPF schedulers Andrea Righi
2026-07-16 13:20 ` [PATCH 09/11] sched_ext: Add selftest for blocked donor admission Andrea Righi
2026-07-16 13:20 ` [PATCH 10/11] sched_ext: scx_qmap: Add proxy execution support Andrea Righi
2026-07-16 15:54 ` sashiko-bot [this message]
2026-07-16 13:20 ` [PATCH 11/11] sched: Allow enabling proxy exec with sched_ext Andrea Righi
-- strict thread matches above, loose matches on Subject: below --
2026-07-15 20:54 [PATCHSET v6 sched_ext/for-7.3] sched: Make proxy execution compatible " Andrea Righi
2026-07-15 20:54 ` [PATCH 10/11] sched_ext: scx_qmap: Add proxy execution support Andrea Righi
2026-07-15 21:35 ` 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=20260716155412.7DA841F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=arighi@nvidia.com \
--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 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.