From: Cheng-Yang Chou <yphbchou0911@gmail.com>
To: sched-ext@lists.linux.dev
Cc: tj@kernel.org, void@manifault.com, arighi@nvidia.com,
changwoo@igalia.com, jserv@ccns.ncku.edu.tw,
yphbchou0911@gmail.com
Subject: [PATCH 0/2] sched_ext: Update demo schedulers and selftests for deprecated APIs
Date: Thu, 12 Mar 2026 12:19:59 +0800 [thread overview]
Message-ID: <20260312042001.955675-1-yphbchou0911@gmail.com> (raw)
Two sets of sched_ext APIs have been deprecated:
- Direct writes to p->scx.dsq_vtime in favor of
scx_bpf_task_set_dsq_vtime()
- ops.cpu_acquire/release() in favor of handling CPU preemption via the
sched_switch tracepoint
This series updates the demo schedulers (scx_simple, scx_flatcg,
scx_qmap) and selftests (select_cpu_vtime, maximal) to use the new
APIs, keeping them in sync with current best practices.
Patch 1 uses bpf_ksym_exists() to fall back to direct assignment on
older kernels that don't have scx_bpf_task_set_dsq_vtime(), preserving
backwards compatibility.
Patch 2 removes the cpu_acquire/release stubs and the
__COMPAT_scx_bpf_reenqueue_local_from_anywhere() compat guard from
scx_qmap, unconditionally relying on the sched_switch TP.
Thanks,
Cheng-Yang
---
Cheng-Yang Chou (2):
sched_ext: Update demo schedulers and selftests to use
scx_bpf_task_set_dsq_vtime()
sched_ext: Update demo schedulers and selftests to drop
ops.cpu_acquire/release()
tools/sched_ext/scx_flatcg.bpf.c | 21 ++++++++++++++-----
tools/sched_ext/scx_qmap.bpf.c | 15 ++-----------
tools/sched_ext/scx_simple.bpf.c | 12 +++++++++--
.../testing/selftests/sched_ext/maximal.bpf.c | 15 ++++++-------
.../sched_ext/select_cpu_vtime.bpf.c | 13 ++++++++++--
5 files changed, 45 insertions(+), 31 deletions(-)
--
2.48.1
next reply other threads:[~2026-03-12 4:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 4:19 Cheng-Yang Chou [this message]
2026-03-12 4:20 ` [PATCH 1/2] sched_ext: Update demo schedulers and selftests to use scx_bpf_task_set_dsq_vtime() Cheng-Yang Chou
2026-03-12 6:41 ` Andrea Righi
2026-03-12 4:20 ` [PATCH 2/2] sched_ext: Update demo schedulers and selftests to drop ops.cpu_acquire/release() Cheng-Yang Chou
2026-03-12 7:40 ` Andrea Righi
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=20260312042001.955675-1-yphbchou0911@gmail.com \
--to=yphbchou0911@gmail.com \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=jserv@ccns.ncku.edu.tw \
--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 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.