linux/kernel/sched/ext
Tejun Heo 0ec5dd0669 sched_ext: Use runnable_at for the default core-sched task ordering
The default core-sched ordering runs the longest waiting task first by
comparing p->scx.core_sched_at stamps. The stamp is maintained under two
rules. touch_core_sched() stamps when a task starts waiting for a CPU and
when its slice runs out. If the scheduler implements
ops.core_sched_before(), touch_core_sched_dispatch() re-stamps on every
dispatch.

A comparison can see one stamp taken under each rule, which isn't a
meaningful ordering. The dispatch rule also buys little - it only aligns
bypass-mode comparisons with the local DSQ order. Multiple schedulers make
the mixed comparisons more common.

Wait time is what p->scx.runnable_at already tracks for the stall watchdog.
Delete core_sched_at with both touch functions and compare runnable_at in
the scx_prio_less() fallback.

runnable_at is refreshed only on enqueue and goes stale while a task keeps
occupying its CPU. Instead of re-stamping, order a running task after every
waiting task as it is the most recently serviced.

Signed-off-by: Tejun Heo <tj@kernel.org>
2026-08-15 16:07:49 -10:00
..
arena.c sched_ext: Convert scx_arena_grow() to use scx_arena_to_kaddr() 2026-06-25 10:16:30 -10:00
arena.h
cid.c sched_ext: Build the cid tables privately and publish them with RCU 2026-07-21 22:27:27 -10:00
cid.h sched_ext: Gate cid kfuncs behind the SCX struct_ops check 2026-08-12 08:29:15 -10:00
ext.c sched_ext: Use runnable_at for the default core-sched task ordering 2026-08-15 16:07:49 -10:00
ext.h
idle.c sched_ext: Merge branch 'for-7.2-fixes' into for-7.3 2026-08-12 06:46:28 -10:00
idle.h
inlines.h sched_ext: Rename balance-era identifiers to dispatch terms 2026-08-15 00:07:42 -10:00
internal.h sched_ext: fix stale references in doc comments 2026-08-14 09:10:20 -10:00
sub.c sched_ext: Move the config-off sub-cap kfunc stubs into sub.c 2026-08-15 14:06:50 -10:00
sub.h sched_ext: Add bandwidth-limited rescue execution for stranded tasks 2026-08-03 11:01:29 -10:00
types.h sched_ext: Eject the top rescue consumer on overload 2026-08-03 11:01:36 -10:00