summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@linaro.org>2025-07-08 19:56:26 +0300
committerPeter Zijlstra <peterz@infradead.org>2025-07-09 14:40:22 +0300
commit74eec63661d46a7153d04c2e0249eeb76cc76d44 (patch)
tree5b4fa7844537b4ab10e0a817d04c230f343c76f0 /include/linux
parent9cdb4fe20cd239c848b5c3f5753d83a9443ba329 (diff)
downloadlinux-74eec63661d46a7153d04c2e0249eeb76cc76d44.tar.xz
sched/fair: Fix NO_RUN_TO_PARITY case
EEVDF expects the scheduler to allocate a time quantum to the selected entity and then pick a new entity for next quantum. Although this notion of time quantum is not strictly doable in our case, we can ensure a minimum runtime for each task most of the time and pick a new entity after a minimum time has elapsed. Reuse the slice protection of run to parity to ensure such runtime quantum. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20250708165630.1948751-3-vincent.guittot@linaro.org
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4802fcf738cd..55921385927d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -583,7 +583,15 @@ struct sched_entity {
u64 sum_exec_runtime;
u64 prev_sum_exec_runtime;
u64 vruntime;
- s64 vlag;
+ union {
+ /*
+ * When !@on_rq this field is vlag.
+ * When cfs_rq->curr == se (which implies @on_rq)
+ * this field is vprot. See protect_slice().
+ */
+ s64 vlag;
+ u64 vprot;
+ };
u64 slice;
u64 nr_migrations;