Skip to content

Commit

Permalink
sched: Remove rq->avg_load_per_task
Browse files Browse the repository at this point in the history
Since commit a2d4777 ("sched: fix stale value in average load per task")
the variable rq->avg_load_per_task is no longer required. Remove it.

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1312189408-17172-1-git-send-email-schnhrr@cs.tu-berlin.de
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Jan H. Schönherr authored and Ingo Molnar committed Aug 14, 2011
1 parent eeca736 commit e2b245f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,6 @@ struct rq {
int cpu;
int online;

unsigned long avg_load_per_task;

u64 rt_avg;
u64 age_stamp;
u64 idle_stamp;
Expand Down Expand Up @@ -1569,11 +1567,9 @@ static unsigned long cpu_avg_load_per_task(int cpu)
unsigned long nr_running = ACCESS_ONCE(rq->nr_running);

if (nr_running)
rq->avg_load_per_task = rq->load.weight / nr_running;
else
rq->avg_load_per_task = 0;
return rq->load.weight / nr_running;

return rq->avg_load_per_task;
return 0;
}

#ifdef CONFIG_PREEMPT
Expand Down

0 comments on commit e2b245f

Please sign in to comment.