aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-04 03:07:19 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-04 03:07:19 -0500
commitb8307db2477f9c551e54e0c7b643ea349a3349cd (patch)
tree88654f8bd73857bbd40f75013ce41d8882d16ce6 /kernel/sched.c
parentf0461d0146ee30927bc7efa2ae24ea8c6693b725 (diff)
parent061e41fdb5047b1fb161e89664057835935ca1d2 (diff)
Merge commit 'v2.6.28-rc7' into tracing/core
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 52490bf6b884..7729c4bbc8ba 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1459,9 +1459,10 @@ static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd);
1459static unsigned long cpu_avg_load_per_task(int cpu) 1459static unsigned long cpu_avg_load_per_task(int cpu)
1460{ 1460{
1461 struct rq *rq = cpu_rq(cpu); 1461 struct rq *rq = cpu_rq(cpu);
1462 unsigned long nr_running = ACCESS_ONCE(rq->nr_running);
1462 1463
1463 if (rq->nr_running) 1464 if (nr_running)
1464 rq->avg_load_per_task = rq->load.weight / rq->nr_running; 1465 rq->avg_load_per_task = rq->load.weight / nr_running;
1465 else 1466 else
1466 rq->avg_load_per_task = 0; 1467 rq->avg_load_per_task = 0;
1467 1468