public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET sched_ext/for-6.19] sched_ext: Deprecate ops.cpu_acquire/release()
@ 2025-10-25  0:18 Tejun Heo
  2025-10-25  0:18 ` [PATCH 1/3] sched_ext: Split schedule_deferred() into locked and unlocked variants Tejun Heo
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Tejun Heo @ 2025-10-25  0:18 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min
  Cc: linux-kernel, sched-ext, Peter Zijlstra, Wen-Fang Liu

The ops.cpu_acquire/release() callbacks are broken. They miss events under
multiple conditions and can't be fixed without adding global sched core hooks
that sched maintainers don't want. They also aren't necessary as BPF schedulers
can use generic BPF mechanisms like tracepoints to achieve the same goals.

The main use case for cpu_release() was calling scx_bpf_reenqueue_local() when
a CPU gets preempted by a higher priority scheduling class. This patchset makes
scx_bpf_reenqueue_local() callable from any context by adding deferred
execution support, which completely eliminates the need for cpu_acquire/release()
callbacks.

This patchset contains the following three patches:

  0001-sched_ext-Split-schedule_deferred-into-locked-and-un.patch
  0002-sched_ext-Factor-out-reenq_local-from-scx_bpf_reenqu.patch
  0003-sched_ext-Allow-scx_bpf_reenqueue_local-to-be-called.patch

Based on sched_ext/for-6.19 (dcb938c45328).

Git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx-reenq-anywhere

 kernel/sched/ext.c                       | 114 +++++++++++++++++++++++--------
 kernel/sched/sched.h                     |   1 +
 tools/sched_ext/include/scx/common.bpf.h |   1 -
 tools/sched_ext/include/scx/compat.bpf.h |  23 +++++++
 tools/sched_ext/scx_qmap.bpf.c           |  38 ++++++++---
 5 files changed, 136 insertions(+), 41 deletions(-)

--
tejun

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

end of thread, other threads:[~2025-12-13  1:18 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-25  0:18 [PATCHSET sched_ext/for-6.19] sched_ext: Deprecate ops.cpu_acquire/release() Tejun Heo
2025-10-25  0:18 ` [PATCH 1/3] sched_ext: Split schedule_deferred() into locked and unlocked variants Tejun Heo
2025-10-25 23:17   ` Emil Tsalapatis
2025-10-25  0:18 ` [PATCH 2/3] sched_ext: Factor out reenq_local() from scx_bpf_reenqueue_local() Tejun Heo
2025-10-25 23:19   ` Emil Tsalapatis
2025-10-25  0:18 ` [PATCH 3/3] sched_ext: Allow scx_bpf_reenqueue_local() to be called from anywhere Tejun Heo
2025-10-25 23:21   ` Emil Tsalapatis
2025-10-27  9:18   ` Peter Zijlstra
2025-10-27 16:00     ` Tejun Heo
2025-10-27 17:49       ` Peter Zijlstra
2025-10-27 18:05         ` Tejun Heo
2025-10-27 18:07           ` Peter Zijlstra
2025-10-27 18:10       ` Peter Zijlstra
2025-10-27 18:17         ` Tejun Heo
2025-10-28 11:01           ` Peter Zijlstra
2025-10-28 17:07             ` Tejun Heo
2025-10-27 18:19   ` [PATCH v2 " Tejun Heo
2025-10-29 10:45     ` Peter Zijlstra
2025-10-29 15:11       ` Tejun Heo
2025-10-29 15:49     ` [PATCH v3 " Tejun Heo
2025-11-27 10:39       ` Kuba Piecuch
2025-12-02 23:05         ` Tejun Heo
2025-12-11 14:24       ` Kuba Piecuch
2025-12-11 16:17         ` Tejun Heo
2025-12-11 16:20           ` Tejun Heo
2025-12-13  1:16             ` Andrea Righi
2025-12-13  1:18               ` Tejun Heo
2025-10-29 15:31 ` [PATCHSET sched_ext/for-6.19] sched_ext: Deprecate ops.cpu_acquire/release() Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox