[patch 4/5] sched: use rq->clock_task instead of rq->clock for maintaining load averages

Paul Turner
2011-01-22T05:05:05Z

[-- Attachment #1: sched-use_clock_task.patch --]
[-- Type: text/plain, Size: 836 bytes --]

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>

---
kernel/sched_fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: tip3/kernel/sched_fair.c
===================================================================
--- tip3.orig/kernel/sched_fair.c
+++ tip3/kernel/sched_fair.c
@@ -724,7 +724,7 @@ static void update_cfs_load(struct cfs_r
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 */