diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-28 20:11:05 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-28 20:11:05 +0100 |
commit | f1860c34b3ed829ac774647f266abf1074cd58cd (patch) | |
tree | 05f368f644c13a21d080ec258393037257e0495f /kernel | |
parent | 64b7482de253c10efa2589a6212e3d2093a3efc7 (diff) | |
parent | 4cd4262034849da01eb88659af677b69f8169f06 (diff) |
Merge branch 'sched/urgent' into sched/core
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 338340a3fb8..3d1ee429219 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1433,9 +1433,10 @@ static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd); static unsigned long cpu_avg_load_per_task(int cpu) { struct rq *rq = cpu_rq(cpu); + unsigned long nr_running = rq->nr_running; - if (rq->nr_running) - rq->avg_load_per_task = rq->load.weight / rq->nr_running; + if (nr_running) + rq->avg_load_per_task = rq->load.weight / nr_running; else rq->avg_load_per_task = 0; |