Skip to content

Commit

Permalink
Merge branch 'sched/urgent' into sched/core
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingo Molnar committed Nov 28, 2008
2 parents 64b7482 + 4cd4262 commit f1860c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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 f1860c3

Please sign in to comment.