Skip to content

Commit

Permalink
sched: kill unused parameter of pick_next_task()
Browse files Browse the repository at this point in the history
Impact: micro-optimization

Parameter "prev" is not used really.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Wang Chen authored and Ingo Molnar committed Mar 2, 2009
1 parent 72fd455 commit b67802e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -4603,7 +4603,7 @@ static inline void schedule_debug(struct task_struct *prev)
* Pick up the highest-prio task:
*/
static inline struct task_struct *
pick_next_task(struct rq *rq, struct task_struct *prev)
pick_next_task(struct rq *rq)
{
const struct sched_class *class;
struct task_struct *p;
Expand Down Expand Up @@ -4678,7 +4678,7 @@ asmlinkage void __sched schedule(void)
idle_balance(cpu, rq);

prev->sched_class->put_prev_task(rq, prev);
next = pick_next_task(rq, prev);
next = pick_next_task(rq);

if (likely(prev != next)) {
sched_info_switch(prev, next);
Expand Down Expand Up @@ -6514,7 +6514,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
if (!rq->nr_running)
break;
update_rq_clock(rq);
next = pick_next_task(rq, rq->curr);
next = pick_next_task(rq);
if (!next)
break;
next->sched_class->put_prev_task(rq, next);
Expand Down

0 comments on commit b67802e

Please sign in to comment.