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_task

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, see post_init_entity_util_avg.

cfs_rq->avg is used for task_h_load and update_cfs_share for example.

Returns true if the load decayed or we removed utilization. It is expected that one calls update_tg_load_avg on this condition, but after you've modified the cfs_rq avg (attach/detach), such that we propagate the new avg up.