All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v2 sched_ext/for-7.2] sched_ext: cid/cmask interface prep
@ 2026-06-04  2:00 Tejun Heo
  2026-06-04  2:00 ` [PATCH 1/4] sched_ext: Order single-cid cmask helpers as (cid, mask) Tejun Heo
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Tejun Heo @ 2026-06-04  2:00 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min
  Cc: Emil Tsalapatis, sched-ext, linux-kernel, Tejun Heo

Hello,

v2:
- New patch 2 reorders the BPF-side cmask helpers (cid.bpf.h) and their
  callers to (cid, mask) so the kernel and BPF interfaces match.
- Bound scx_cmask_for_each_cid() to the active range so a stale word past
  it can't yield a phantom cid (sashiko AI).
- scx_bpf_kick_cid() returns scx_cid_to_cpu()'s errno instead of -EINVAL
  (Andrea).

v1: https://lore.kernel.org/r/20260603172153.3081861-1-tj@kernel.org

Preparatory changes to the cid/cmask interface that landed in for-7.2 this
cycle - a single-cid helper-argument reorder on the kernel and BPF sides,
two new helpers, and a kfunc return-type change. Posting ahead of the merge
window, in particular the scx_bpf_kick_cid() return-type change in patch 4 -
it changes a kfunc's signature and is cleaner to settle before 7.2 ships.

- Patch 1 reorders the single-cid cmask helpers to (cid, mask), matching the
  kernel's index-first bit and cpumask predicates.
- Patch 2 reorders the BPF-side counterparts in cid.bpf.h the same way.
- Patch 3 adds scx_cmask_test() and scx_cmask_for_each_cid().
- Patch 4 switches scx_bpf_kick_cid() from void to s32 so future cap
  enforcement can surface failures. The cid interface has no external users
  yet, so the ABI change is safe now.

These are extracted from the in-development sub-scheduler series. Nothing
here depends on the rest of that work.

Base
----

sched_ext/for-7.2 (dad836524259)

 kernel/sched/ext.c                       | 13 ++++---
 kernel/sched/ext_cid.c                   |  2 +-
 kernel/sched/ext_cid.h                   | 53 +++++++++++++++++++++++++---
 tools/sched_ext/include/scx/cid.bpf.h    | 60 ++++++++++++++++----------------
 tools/sched_ext/include/scx/common.bpf.h |  2 +-
 tools/sched_ext/scx_qmap.bpf.c           | 12 +++----
 6 files changed, 94 insertions(+), 48 deletions(-)

Thanks.

--
tejun

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-06-04  8:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04  2:00 [PATCHSET v2 sched_ext/for-7.2] sched_ext: cid/cmask interface prep Tejun Heo
2026-06-04  2:00 ` [PATCH 1/4] sched_ext: Order single-cid cmask helpers as (cid, mask) Tejun Heo
2026-06-04  2:00 ` [PATCH 2/4] tools/sched_ext: " Tejun Heo
2026-06-04  2:00 ` [PATCH 3/4] sched_ext: Add scx_cmask_test() and scx_cmask_for_each_cid() Tejun Heo
2026-06-04  2:10   ` sashiko-bot
2026-06-04  2:00 ` [PATCH 4/4] sched_ext: Make scx_bpf_kick_cid() return s32 Tejun Heo
2026-06-04  6:18 ` [PATCHSET v2 sched_ext/for-7.2] sched_ext: cid/cmask interface prep Andrea Righi
2026-06-04  8:32 ` Tejun Heo

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.