sched/fair: Manage lag and run to parity with different slices
From: | Vincent Guittot <vincent.guittot-AT-linaro.org> | |
To: | mingo-AT-redhat.com, peterz-AT-infradead.org, juri.lelli-AT-redhat.com, dietmar.eggemann-AT-arm.com, rostedt-AT-goodmis.org, bsegall-AT-google.com, mgorman-AT-suse.de, vschneid-AT-redhat.com, linux-kernel-AT-vger.kernel.org | |
Subject: | [PATCH 0/4] sched/fair: Manage lag and run to parity with different slices | |
Date: | Fri, 13 Jun 2025 16:05:10 +0200 | |
Message-ID: | <20250613140514.2781138-1-vincent.guittot@linaro.org> | |
Cc: | Vincent Guittot <vincent.guittot-AT-linaro.org> | |
Archive-link: | Article |
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-vinc... 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