diff options
author | Peter Zijlstra <peterz@infradead.org> | 2024-04-26 13:00:50 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2024-08-17 11:06:45 +0200 |
commit | fc1892becd5672f52329a75c73117b60ac7841b7 (patch) | |
tree | 0c307a4d938ffae870b919203d796346a247a608 /kernel/sched/sched.h | |
parent | sched/fair: Implement DELAY_ZERO (diff) | |
download | linux-fc1892becd5672f52329a75c73117b60ac7841b7.tar.xz linux-fc1892becd5672f52329a75c73117b60ac7841b7.zip |
sched/eevdf: Fixup PELT vs DELAYED_DEQUEUE
Note that tasks that are kept on the runqueue to burn off negative
lag, are not in fact runnable anymore, they'll get dequeued the moment
they get picked.
As such, don't count this time towards runnable.
Thanks to Valentin for spotting I had this backwards initially.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
Tested-by: Valentin Schneider <vschneid@redhat.com>
Link: https://lkml.kernel.org/r/20240727105030.514088302@infradead.org
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 263b4ded2b47..2f5d658c0631 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -820,6 +820,9 @@ static inline void se_update_runnable(struct sched_entity *se) static inline long se_runnable(struct sched_entity *se) { + if (se->sched_delayed) + return false; + if (entity_is_task(se)) return !!se->on_rq; else @@ -834,6 +837,9 @@ static inline void se_update_runnable(struct sched_entity *se) { } static inline long se_runnable(struct sched_entity *se) { + if (se->sched_delayed) + return false; + return !!se->on_rq; } |