diff options
author | Alex Shi <alex.shi@intel.com> | 2013-06-20 02:18:53 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-06-27 08:07:38 (GMT) |
commit | 72a4cf20cb71a327c636c7042fdacc25abffc87c (patch) | |
tree | 55679cadceb7ddf931f0c56a65e8eb031acd769d /kernel/sched/fair.c | |
parent | a003a25b227d59ded9197ced109517f037d01c27 (diff) | |
download | linux-fsl-qoriq-72a4cf20cb71a327c636c7042fdacc25abffc87c.tar.xz |
sched: Change cfs_rq load avg to unsigned long
Since the 'u64 runnable_load_avg, blocked_load_avg' in cfs_rq struct are
smaller than 'unsigned long' cfs_rq->load.weight. We don't need u64
vaiables to describe them. unsigned long is more efficient and convenience.
Signed-off-by: Alex Shi <alex.shi@intel.com>
Reviewed-by: Paul Turner <pjt@google.com>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-10-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7948bb8..f19772d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4181,12 +4181,9 @@ static int tg_load_down(struct task_group *tg, void *data) if (!tg->parent) { load = cpu_rq(cpu)->avg.load_avg_contrib; } else { - unsigned long tmp_rla; - tmp_rla = tg->parent->cfs_rq[cpu]->runnable_load_avg + 1; - load = tg->parent->cfs_rq[cpu]->h_load; - load *= tg->se[cpu]->avg.load_avg_contrib; - load /= tmp_rla; + load = div64_ul(load * tg->se[cpu]->avg.load_avg_contrib, + tg->parent->cfs_rq[cpu]->runnable_load_avg + 1); } tg->cfs_rq[cpu]->h_load = load; |