Skip to content

Commit

Permalink
sched: Use rq->clock_task instead of rq->clock for correctly maintain…
Browse files Browse the repository at this point in the history
…ing load averages

The delta in clock_task is a more fair attribution of how much time a tg has
been contributing load to the current cpu.

While not really important it also means we're more in sync (by magnitude)
with respect to periodic updates (since __update_curr deltas are clock_task
based).

Signed-off-by: Paul Turner <pjt@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20110122044852.007092349@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Paul Turner authored and Ingo Molnar committed Jan 26, 2011
1 parent b815f19 commit 05ca62c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ static void update_cfs_load(struct cfs_rq *cfs_rq, int global_update)
if (cfs_rq->tg == &root_task_group)
return;

now = rq_of(cfs_rq)->clock;
now = rq_of(cfs_rq)->clock_task;
delta = now - cfs_rq->load_stamp;

/* truncate load history at 4 idle periods */
Expand Down

0 comments on commit 05ca62c

Please sign in to comment.