[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1240919612.7620.155.camel@twins>
Date: Tue, 28 Apr 2009 13:53:32 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: marywangran <marywangran@...il.com>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] sched: make sure sched_child_runs_first WORK
On Tue, 2009-04-28 at 19:26 +0800, marywangran wrote:
> Signed-off-by: Ya Zhao <marywangran@...il.com>
> ---
> --- linux-2.6.28.1/kernel/sched_fair.c.orig 2009-04-28
> 22:26:00.000000000 +0800
> +++ linux-2.6.28.1/kernel/sched_fair.c 2009-04-28 22:34:49.000000000 +0800
> @@ -1628,12 +1628,13 @@ static void task_new_fair(struct rq *rq,
>
> /* 'curr' will be NULL if the child belongs to a different group */
> if (sysctl_sched_child_runs_first && this_cpu == task_cpu(p) &&
> - curr && curr->vruntime < se->vruntime) {
> + curr){
> /*
> * Upon rescheduling, sched_class::put_prev_task() will place
> * 'current' within the tree based on its new key value.
> */
> - swap(curr->vruntime, se->vruntime);
> + if( curr->vruntime < se->vruntime )
> + swap(curr->vruntime, se->vruntime);
> resched_task(rq->curr);
> }
Aside from the style issue the patch seems sensible enough.
Thing is, do we really care about child runs first?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists