From: Paul Turner Date: Sat, 22 Jan 2011 04:45:02 +0000 (-0800) Subject: sched: Use rq->clock_task instead of rq->clock for correctly maintaining load averages X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=05ca62c6ca17f39b88fa956d5ebc1fa6e93ad5e3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Paul Turner Signed-off-by: Peter Zijlstra LKML-Reference: <20110122044852.007092349@google.com> Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 1997383ba4d6..0c26e2df450e 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -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 */