linux/include
Tejun Heo bb70e4fb62 sched_ext: Eject the top rescue consumer on overload
When rescue demand on a cpu persistently exceeds the configured bandwidth,
tasks age on that cpu's rescue DSQ until the stall watchdog fires. The
watchdog blames the waiting task's owner, but the misbehaving party is
whoever floods the queue, not whoever happens to time out.

Track each sched's recent rescue consumption per cpu as a decaying average.
Once the oldest waiter on a cpu's rescue DSQ has been queued past a
threshold derived from the rescue knobs (4s at the defaults), the rescue
timer ejects the sub with the highest recent consumption on that cpu with
SCX_EXIT_ERROR_RESCUE. With no recent consumer there is no victim and
nothing is ejected - the generic stall watchdog eventually blames the
waiter's owner instead. Ejections on a cpu are spaced one threshold apart so
the freed bandwidth can drain the backlog before another sub is judged.

The overload check only wins the race against the stall watchdog when the
watchdog timeout clears the threshold, and a single in-budget wait must not
cross the trigger on its own. Warn on a scheduler whose timeout doesn't fit
and on knobs whose funding period exceeds half the threshold.

v2: - Track kill_at in jiffies_64 - on 32-bit, the time_before() grace check
      wraps 2^31 ticks after the last ejection and suppresses ejections.
      (sashiko AI)

    - Track rescue_avg_at in jiffies_64 likewise - the unsigned long decay
      delta truncates mod 2^32 on 32-bit and can revive a weeks-old usage
      average in the victim pick.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
2026-08-03 11:01:36 -10:00
..
acpi Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
asm-generic mm.git review status for mm-hotfixes-stable..mm-nonmm-stable 2026-06-21 13:20:19 -07:00
clocksource
crypto Networking changes for 7.2. 2026-06-17 08:17:00 +01:00
cxl cxl/region: Introduce devm_cxl_probe_mem() 2026-06-12 13:47:30 -07:00
drm drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
dt-bindings Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
hyperv hyperv: Clean up and fix the guest ID comment in hvgdk.h 2026-05-27 15:05:26 -07:00
keys keys: Pin request_key_auth payload in instantiate paths 2026-06-15 15:19:13 +03:00
kunit linux_kselftest-kunit-7.2-rc1 2026-06-16 16:33:57 +05:30
kvm Merge branch kvm-arm64/vgic-v5-PPI-fixes into kvmarm-master/next 2026-06-12 09:08:31 +01:00
linux sched_ext: Eject the top rescue consumer on overload 2026-08-03 11:01:36 -10:00
math-emu
media media: v4l2-fwnode: Fix subdev owner overwritten in v4l2_async_register_subdev_sensor() 2026-06-05 10:28:03 +03:00
memory
misc
net Asides of the avalanche of LLM-driven fixes, there are a couple of 2026-06-21 10:26:31 -07:00
pcmcia
ras
rdma RDMA v7.2 merge window 2026-06-18 08:16:21 -07:00
rv rv: Prevent task migration while handling per-CPU events 2026-06-03 12:33:25 +02:00
scsi
soc phy-for-7.2 2026-06-23 15:41:48 -07:00
sound ASoC: Updates for v7.2 2026-06-15 20:19:22 +02:00
target
trace sched_ext: Add tracepoint for scheduler exit 2026-07-10 06:25:24 -10:00
uapi Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
ufs Merge branch 7.1/scsi-fixes into 7.2/scsi-staging 2026-06-15 21:01:30 -04:00
vdso futex: Provide infrastructure to plug the non contended robust futex unlock race 2026-06-03 11:38:52 +02:00
video
xen xen: constify xsd_errors array 2026-06-08 09:00:06 +02:00
Kbuild