Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121335
b: refs/heads/master
c: f1860c3
h: refs/heads/master
i:
  121333: fa4f08e
  121331: c63b3af
  121327: 6ae45db
v: v3
  • Loading branch information
Ingo Molnar committed Nov 28, 2008
1 parent 8a6edb1 commit 3b90824
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64b7482de253c10efa2589a6212e3d2093a3efc7
refs/heads/master: f1860c34b3ed829ac774647f266abf1074cd58cd
5 changes: 3 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3b90824

Please sign in to comment.