update_cfs_rq_load_avg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to update_cfs_rq_load_avg(9) from the Kernel API Manual 🫢 this is the page for updating the cfs_rq’s load/util averages, and yes it’s giving scheduler-core main character energy πŸ’…

🌸 NAME 🌸

update_cfs_rq_load_avg β€” update the cfs_rq’s load/util averages ✨

✨ SYNOPSIS ✨

int update_cfs_rq_load_avg (u64 now , struct cfs_rq *cfs_rq );

πŸŽ€ ARGUMENTS πŸŽ€

  • now β€” current time, as per cfs_rq_clock_pelt ⏰
  • cfs_rq β€” cfs_rq to update πŸ’–

πŸ’… DESCRIPTION πŸ’…

The cfs_rq avg is the direct sum of all its entities (blocked and runnable) avg. The immediate corollary is that all (fair) tasks must be attached. no cap, that’s the whole vibe 🧚

cfs_rq->avg is used for task_h_load and update_cfs_group, for example. iconic little fields, honestly πŸ‘‘

Since both these conditions indicate a changed cfs_rq->avg.load, we should call update_tg_load_avg when this function returns true. periodt πŸ’«

πŸ”₯ RETURN πŸ”₯

true if the load decayed or we removed load. that’s the signal, bestie 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./kernel/sched/fair.c β€” also go peek at these:


and that’s the page, bestie πŸŽ€ source/version line says ./kernel/sched, date October 2026, footer title still update_cfs_rq_load_avg(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from