linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET sched_ext/for-6.16] sched_ext: Introduce scx_sched
@ 2025-04-23 23:44 Tejun Heo
  2025-04-23 23:44 ` [PATCH 01/12] " Tejun Heo
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Tejun Heo @ 2025-04-23 23:44 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min, linux-kernel

In preparation of supporting multiple hierarchical schedulers, this patchset
packages the states which are currently global but need to become per
scheduler instance into the new struct scx_sched.

Currently, the only supported scheduler instance is the system-wide root one
(scx_root) and the code assumes scx_root in many places. A follow-up
patchset will introduce multiple scheduler support scrutinizing and updating
each such occurrence appropriately.

There's significant amount of churning but most changes are straightforward
if not trivial, and no user visible changes are expected.

0001-sched_ext-Introduce-scx_sched.patch
0002-sched_ext-Avoid-NULL-scx_root-deref-through-SCX_HAS_.patch
0003-sched_ext-Use-dynamic-allocation-for-scx_sched.patch
0004-sched_ext-Inline-create_dsq-into-scx_bpf_create_dsq.patch
0005-sched_ext-Factor-out-scx_alloc_and_add_sched.patch
0006-sched_ext-Move-dsq_hash-into-scx_sched.patch
0007-sched_ext-Move-global_dsqs-into-scx_sched.patch
0008-sched_ext-Relocate-scx_event_stats-definition.patch
0009-sched_ext-Factor-out-scx_read_events.patch
0010-sched_ext-Move-event_stats_cpu-into-scx_sched.patch
0011-sched_ext-Move-disable-machinery-into-scx_sched.patch
0012-sched_ext-Clean-up-SCX_EXIT_NONE-handling-in-scx_dis.patch

and is also available in the following git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx_sched

diffstat follows. Thanks.

 kernel/sched/ext.c      |  886 ++++++++++++++++++++++++++----------------------
 kernel/sched/ext_idle.c |    3
 2 files changed, 491 insertions(+), 398 deletions(-)

--
tejun


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCHSET v2 sched_ext/for-6.16] sched_ext: Introduce scx_sched
@ 2025-04-25 21:58 Tejun Heo
  2025-04-25 21:58 ` [PATCH 02/12] sched_ext: Avoid NULL scx_root deref through SCX_HAS_OP() Tejun Heo
  0 siblings, 1 reply; 19+ messages in thread
From: Tejun Heo @ 2025-04-25 21:58 UTC (permalink / raw)
  To: void, arighi, multics69; +Cc: linux-kernel, sched-ext

v[1] -> v2:

- 0003-sched_ext-Use-dynamic-allocation-for-scx_sched.patch updated to store
  scx_sched pointer in sched_ext_ops->priv so that bpf_scx_unreg() can
  determine the scx_sched to destroy regardless of where initialization
  failed. This will also help with supporting multiple schedulers.

- Minor updates to 0010-sched_ext-Move-event_stats_cpu-into-scx_sched.patch.

In preparation of supporting multiple hierarchical schedulers, this patchset
packages the states which are currently global but need to become per
scheduler instance into the new struct scx_sched.

Currently, the only supported scheduler instance is the system-wide root one
(scx_root) and the code assumes scx_root in many places. A follow-up
patchset will introduce multiple scheduler support scrutinizing and updating
each such occurrence appropriately.

There's significant amount of churning but most changes are straightforward
if not trivial, and no user visible changes are expected.

 0001-sched_ext-Introduce-scx_sched.patch
 0002-sched_ext-Avoid-NULL-scx_root-deref-through-SCX_HAS_.patch
 0003-sched_ext-Use-dynamic-allocation-for-scx_sched.patch
 0004-sched_ext-Inline-create_dsq-into-scx_bpf_create_dsq.patch
 0005-sched_ext-Factor-out-scx_alloc_and_add_sched.patch
 0006-sched_ext-Move-dsq_hash-into-scx_sched.patch
 0007-sched_ext-Move-global_dsqs-into-scx_sched.patch
 0008-sched_ext-Relocate-scx_event_stats-definition.patch
 0009-sched_ext-Factor-out-scx_read_events.patch
 0010-sched_ext-Move-event_stats_cpu-into-scx_sched.patch
 0011-sched_ext-Move-disable-machinery-into-scx_sched.patch
 0012-sched_ext-Clean-up-SCX_EXIT_NONE-handling-in-scx_dis.patch

and is also available in the following git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx_sched-v2

diffstat follows. Thanks.

 kernel/sched/ext.c      |  892 ++++++++++++++++++++++++++----------------------
 kernel/sched/ext_idle.c |    3
 2 files changed, 496 insertions(+), 399 deletions(-)

--
tejun

[1] http://lkml.kernel.org/r/20250423234542.1890867-1-tj@kernel.org

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

end of thread, other threads:[~2025-04-25 21:58 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23 23:44 [PATCHSET sched_ext/for-6.16] sched_ext: Introduce scx_sched Tejun Heo
2025-04-23 23:44 ` [PATCH 01/12] " Tejun Heo
2025-04-23 23:44 ` [PATCH 02/12] sched_ext: Avoid NULL scx_root deref through SCX_HAS_OP() Tejun Heo
2025-04-24  7:23   ` Chengming Zhou
2025-04-24 18:55     ` Tejun Heo
2025-04-23 23:44 ` [PATCH 03/12] sched_ext: Use dynamic allocation for scx_sched Tejun Heo
2025-04-25 10:14   ` Andrea Righi
2025-04-25 19:48     ` Tejun Heo
2025-04-23 23:44 ` [PATCH 04/12] sched_ext: Inline create_dsq() into scx_bpf_create_dsq() Tejun Heo
2025-04-23 23:44 ` [PATCH 05/12] sched_ext: Factor out scx_alloc_and_add_sched() Tejun Heo
2025-04-23 23:44 ` [PATCH 06/12] sched_ext: Move dsq_hash into scx_sched Tejun Heo
2025-04-23 23:44 ` [PATCH 07/12] sched_ext: Move global_dsqs " Tejun Heo
2025-04-23 23:44 ` [PATCH 08/12] sched_ext: Relocate scx_event_stats definition Tejun Heo
2025-04-23 23:44 ` [PATCH 09/12] sched_ext: Factor out scx_read_events() Tejun Heo
2025-04-23 23:44 ` [PATCH 10/12] sched_ext: Move event_stats_cpu into scx_sched Tejun Heo
2025-04-25  5:38   ` Changwoo Min
2025-04-23 23:44 ` [PATCH 11/12] sched_ext: Move disable machinery " Tejun Heo
2025-04-23 23:44 ` [PATCH 12/12] sched_ext: Clean up SCX_EXIT_NONE handling in scx_disable_workfn() Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2025-04-25 21:58 [PATCHSET v2 sched_ext/for-6.16] sched_ext: Introduce scx_sched Tejun Heo
2025-04-25 21:58 ` [PATCH 02/12] sched_ext: Avoid NULL scx_root deref through SCX_HAS_OP() Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).