[PATCH 0/4] sched/fair: Manage lag and run to parity with different slices
From: Vincent Guittot
Date: Fri Jun 13 2025 - 10:15:43 EST
This follows the attempt to better track maximum lag of task in presence
of different slices duration:
[1] https://lore.kernel.org/all/20250418151225.3006867-1-vincent.guittot@xxxxxxxxxx/
Patch 1 is a simple cleanup to ease following changes.
Patch 2 uses Peter's proposal made in [1] to track the max slice of
enqueued tasks and use it to clamp the lag of dequeued task.
Patch 3 modify the protection of the slice of the current task to take
into account case when tasks with shorter slice wait to run on the cpu
Patch 4 extend to slice protection mecanism to the NO_RUN_TO_PARITY case
to ensure that a resched will be set regularly. Currently, the resched
will be set only when curr will elapse its slice which is partly similar
to RUN_TO_PARITY. Now the running task has a minimum time quantum (0.7ms)
before eevdf looks for another task to run with the exception of
PREEMPT_SHORT case which remains valid.
Peter Zijlstra (1):
sched/fair: Increase max lag clamping
Vincent Guittot (3):
sched/fair: Use protect_slice() instead of direct comparison
sched/fair: Limit run to parity to the min slice of enqueued entities
sched/fair: Improve NO_RUN_TO_PARITY
include/linux/sched.h | 1 +
kernel/sched/fair.c | 76 ++++++++++++++++++++++++++++++++++---------
2 files changed, 61 insertions(+), 16 deletions(-)
--
2.43.0