summaryrefslogtreecommitdiffstats
path: root/kernel/sched/fair.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-04-26 13:00:50 +0200
committerPeter Zijlstra <peterz@infradead.org>2024-08-17 11:06:45 +0200
commitfc1892becd5672f52329a75c73117b60ac7841b7 (patch)
tree0c307a4d938ffae870b919203d796346a247a608 /kernel/sched/fair.c
parentsched/fair: Implement DELAY_ZERO (diff)
downloadlinux-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/fair.c')
-rw-r--r--kernel/sched/fair.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1a593393e308..0eb1bbf7f269 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5402,6 +5402,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
!entity_eligible(cfs_rq, se)) {
if (cfs_rq->next == se)
cfs_rq->next = NULL;
+ update_load_avg(cfs_rq, se, 0);
se->sched_delayed = 1;
return false;
}
@@ -6841,6 +6842,7 @@ requeue_delayed_entity(struct sched_entity *se)
}
}
+ update_load_avg(cfs_rq, se, 0);
se->sched_delayed = 0;
}