From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCHSET v2 sched_ext/for-7.3-fixes] sched_ext: Idle claim recovery and online cid mask
Date: Tue, 15 Sep 2026 14:27:17 +0200 [thread overview]
Message-ID: <aqk5pfKCXWudIBAD@gpd4> (raw)
In-Reply-To: <20260915082725.3881071-1-tj@kernel.org>
Hi Tejun,
On Mon, Sep 14, 2026 at 10:27:23PM -1000, Tejun Heo wrote:
> Hello,
>
> v2: - Dropped the idle-to-idle notification patch. Restoring an unused idle
> claim from ops.dispatch() is the established pattern (Andrea Righi).
> Replaced with a patch fixing scx_qmap to do that and documenting the
> pattern in ops.update_idle().
> - Reworded the online cmask getter kerneldoc (Andrea Righi).
>
> v1: https://lore.kernel.org/r/20260914234259.3585373-1-tj@kernel.org
>
> Two issues surfaced while converting a scheduler that maintains its own idle
> and online tracking.
>
> An idle CPU can be claimed and kicked without receiving a task. When it
> picks idle again there is no idle transition, so ops.update_idle() stays
> silent and a scheduler tracking idle CPUs itself loses the CPU until an
> unrelated task runs there. scx_qmap has this hole. The first patch restores
> the claim from ops.dispatch(), where a kick guarantees a call, and documents
> the pattern in ops.update_idle().
>
> A cid-form scheduler that installs its own mapping has no way to learn which
> cids are online: the online count identifies the set only under the default
> mapping and the CPU-form cpumask is unusable from cid programs. The second
> patch adds scx_bpf_online_cmask(), a kernel-maintained cmask in the
> scheduler's arena that follows the SCX hotplug notifications.
>
> Verified by building the kernel and tools/sched_ext and running scx_qmap
> under CPU and fork load in a VM. The online cmask patch only changed
> kerneldoc since v1, where a local selftest offlined and onlined a CPU in a
> VM and checked the mask and the callbacks at each step.
Looks good, for the series:
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Thanks,
-Andrea
>
> Based on sched_ext/for-7.3-fixes (c7a1c6e8004a).
>
> This patchset contains the following 2 patches.
>
> 0001 sched_ext: scx_qmap: Restore unused idle claims from ops.dispatch()
> 0002 sched_ext: Maintain an online cid mask in the scheduler arena
>
> The patchset is also available in the following git branch:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git cid-online-cmask-v2
>
> diffstat follows. Thanks.
>
> kernel/sched/ext/ext.c | 75 +++++++++++++++++++++++++++++---
> kernel/sched/ext/internal.h | 9 +++-
> kernel/sched/ext/sub.c | 10 +++--
> tools/sched_ext/include/scx/common.bpf.h | 1 +
> tools/sched_ext/scx_qmap.bpf.c | 14 ++++--
> 5 files changed, 94 insertions(+), 15 deletions(-)
>
> --
> tejun
prev parent reply other threads:[~2026-09-15 12:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 8:27 Tejun Heo
2026-09-15 8:27 ` [PATCH 1/2] sched_ext: scx_qmap: Restore unused idle claims from ops.dispatch() 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 12:27 ` Andrea Righi [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=aqk5pfKCXWudIBAD@gpd4 \
--to=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=void@manifault.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
all inboxes | Powered by JetHome®