lkml.org 
[lkml]   [2012]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 2/4] sched: Push put_prev_task() into pick_next_task()
From
Date
On Thu, 2012-06-14 at 15:29 +0200, Peter Zijlstra wrote:


> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -3176,7 +3176,7 @@ static void put_prev_task(struct rq *rq,
> * Pick up the highest-prio task:
> */
> static inline struct task_struct *
> -pick_next_task(struct rq *rq)
> +pick_next_task(struct rq *rq, struct task_struct *prev)
> {
> const struct sched_class *class;
> struct task_struct *p;
> @@ -3186,13 +3186,13 @@ pick_next_task(struct rq *rq)
> * the fair class we can call that function directly:
> */
> if (likely(rq->nr_running == rq->cfs.h_nr_running)) {
> - p = fair_sched_class.pick_next_task(rq);
> + p = fair_sched_class.pick_next_task(rq, prev);
> if (likely(p))
> return p;
> }
>
> for_each_class(class) {
> - p = class->pick_next_task(rq);
> + p = class->pick_next_task(rq, prev);
> if (p)
> return p;
> }
> @@ -3253,8 +3253,9 @@ static void __sched __schedule(void)
> if (unlikely(!rq->nr_running))
> idle_balance(cpu, rq);
>
> - put_prev_task(rq, prev);

You remove the call to put_prev_task() which looks to be the only user
of this static function. But I don't see the deletion of this function.

-- Steve

> - next = pick_next_task(rq);
> + if (prev->on_rq || rq->skip_clock_update < 0)
> + update_rq_clock(rq);
> + next = pick_next_task(rq, prev);
> clear_tsk_need_resched(prev);
> rq->skip_clock_update = 0;
>
> @@ -5200,7 +5201,7 @@ static void migrate_tasks(unsigned int d
> if (rq->nr_running == 1)
> break;
>
> - next = pick_next_task(rq);
> + next = pick_next_task(rq, NULL);
> BUG_ON(!next);
> next->sched_class->put_prev_task(rq, next);
>




\
 
 \ /
  Last update: 2012-06-14 17:01    [from the cache]
©2003-2011 Jasper Spaans