Commit 05ca62c6 authored by Paul Turner's avatar Paul Turner Committed by Ingo Molnar

sched: Use rq->clock_task instead of rq->clock for correctly maintaining 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: default avatarPaul Turner <pjt@google.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20110122044852.007092349@google.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b815f196
...@@ -725,7 +725,7 @@ static void update_cfs_load(struct cfs_rq *cfs_rq, int global_update) ...@@ -725,7 +725,7 @@ static void update_cfs_load(struct cfs_rq *cfs_rq, int global_update)
if (cfs_rq->tg == &root_task_group) if (cfs_rq->tg == &root_task_group)
return; return;
now = rq_of(cfs_rq)->clock; now = rq_of(cfs_rq)->clock_task;
delta = now - cfs_rq->load_stamp; delta = now - cfs_rq->load_stamp;
/* truncate load history at 4 idle periods */ /* truncate load history at 4 idle periods */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment