summaryrefslogtreecommitdiff
path: root/kernel/sched/features.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2023-05-31 13:58:42 +0200
committerIngo Molnar <mingo@kernel.org>2023-07-19 09:43:58 +0200
commit86bfbb7ce4f67a88df2639198169b685668e7349 (patch)
tree43d0a9352919a405cae0586c7c38e8caca081f76 /kernel/sched/features.h
parente0c2ff903c320d3fd3c2c604dc401b3b7c0a1d13 (diff)
sched/fair: Add lag based placement
With the introduction of avg_vruntime, it is possible to approximate lag (the entire purpose of introducing it in fact). Use this to do lag based placement over sleep+wake. Specifically, the FAIR_SLEEPERS thing places things too far to the left and messes up the deadline aspect of EEVDF. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20230531124603.794929315@infradead.org
Diffstat (limited to 'kernel/sched/features.h')
-rw-r--r--kernel/sched/features.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index fa828b36533d..7958a10fe23b 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -1,12 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0 */
+
/*
* Only give sleepers 50% of their service deficit. This allows
* them to run sooner, but does not allow tons of sleepers to
* rip the spread apart.
*/
+SCHED_FEAT(FAIR_SLEEPERS, false)
SCHED_FEAT(GENTLE_FAIR_SLEEPERS, true)
/*
+ * Using the avg_vruntime, do the right thing and preserve lag across
+ * sleep+wake cycles. EEVDF placement strategy #1, #2 if disabled.
+ */
+SCHED_FEAT(PLACE_LAG, true)
+
+/*
* Prefer to schedule the task we woke last (assuming it failed
* wakeup-preemption), since its likely going to consume data we
* touched, increases cache locality.