(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

selftests/sched_ext: Add lazy preemption tests

Add trace-based coverage for immediate and lazy preemption. An fexit probe on __resched_curr() records the requested TIF after the current task's slice is cleared. SCX_OPS_ENQ_LAST drives the victim through ops.stopping() without relying on an unrelated wakeup. Exercise kick requests individually, in both orders and combined in one call. Verify that immediate preemption and WAIT take precedence over lazy preemption, and that combining immediate and lazy enqueue preemption follows the same rule. Also test overriding the persistent policy in both directions through scx_bpf_task_set_lazy_resched(), and add invalid kick flag coverage. Extend the NO_HZ_FULL test with infinite-slice victims. Wait until the scheduler tick is observed to stop, then verify that lazy enqueue and kick requests restart it and make forward progress. Move the controller off all NO_HZ_FULL CPUs and increase the phase and watchdog timeouts to tolerate scheduling delays in oversubscribed test VMs. Detect both dynamic and static kernel preemption modes and skip mode-sensitive assertions when the active mode is unavailable. Skip trace-based cases when their kernel BTF targets are unavailable, while allowing the independent invalid-flag cases to run. Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>


Author Andrea Righi Committer Tejun Heo Date Commit Parent f8e5a4e3
+1112 -33
9 changed files
+1112 -33
9 changed files