aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-28 14:11:05 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-28 14:11:05 -0500
commitf1860c34b3ed829ac774647f266abf1074cd58cd (patch)
tree05f368f644c13a21d080ec258393037257e0495f /kernel
parent64b7482de253c10efa2589a6212e3d2093a3efc7 (diff)
parent4cd4262034849da01eb88659af677b69f8169f06 (diff)
Merge branch 'sched/urgent' into sched/core
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 338340a3fb89..3d1ee429219b 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);
1433static unsigned long cpu_avg_load_per_task(int cpu) 1433static unsigned long cpu_avg_load_per_task(int cpu)
1434{ 1434{
1435 struct rq *rq = cpu_rq(cpu); 1435 struct rq *rq = cpu_rq(cpu);
1436 unsigned long nr_running = rq->nr_running;
1436 1437
1437 if (rq->nr_running) 1438 if (nr_running)
1438 rq->avg_load_per_task = rq->load.weight / rq->nr_running; 1439 rq->avg_load_per_task = rq->load.weight / nr_running;
1439 else 1440 else
1440 rq->avg_load_per_task = 0; 1441 rq->avg_load_per_task = 0;
1441 1442