The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] sched/fair: Use the task's cfs_rq for PELT on delayed wakeup
@ 2026-12-04 12:20 Chuyi Zhou
  2026-12-04 18:02 ` Kayra Cizmeci
  2026-12-04 23:33 ` Peter Zijlstra
  0 siblings, 2 replies; 3+ messages in thread
From: Chuyi Zhou @ 2026-12-04 12:20 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, vschneid, kprateek.nayak
  Cc: linux-kernel, Chuyi Zhou

A task's PELT averages are tracked on its group's cfs_rq. With CFS
bandwidth control, that runqueue's PELT clock excludes time spent
throttled.

When a task marked for delayed dequeue wakes up, requeue_delayed_entity()
uses the root cfs_rq for EEVDF placement and also passes it to
update_load_avg(). If the group was previously throttled, the root clock
can advance the task's last_update_time past the group clock. The next
update on the group clock can then see a negative delta and reset the
timestamp without accumulating load.

Pass the task's cfs_rq to update_load_avg() on delayed wakeup.

Fixes: 85570f10a4c6 ("sched/eevdf: Move to a single runqueue")
Signed-off-by: Chuyi Zhou <zhouchuyi@bytedance.com>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2d9d3d686261..40b8f96b6b4a 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8142,7 +8142,7 @@ requeue_delayed_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
 		cfs_rq->h_nr_queued++;
 	}
 
-	update_load_avg(cfs_rq, se, 0);
+	update_load_avg(cfs_rq_of(se), se, 0);
 	clear_delayed(se);
 }
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-04 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 12:20 [PATCH] sched/fair: Use the task's cfs_rq for PELT on delayed wakeup Chuyi Zhou
2026-12-04 18:02 ` Kayra Cizmeci
2026-12-04 23:33 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox