Re: [PATCH] sched: fix idle at tick

From: Con Kolivas
Date: Tue Mar 06 2007 - 02:41:44 EST


On Tuesday 06 March 2007 18:02, Andrew Morton wrote:
> On Tue, 6 Mar 2007 17:25:36 +1100 Con Kolivas <kernel@xxxxxxxxxxx> wrote:
> > Signed-off-by: Con Kolivas <kernel@xxxxxxxxxxx>
> > ---
> > kernel/sched.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Index: linux-2.6.21-rc2-mm1-base/kernel/sched.c
> > ===================================================================
> > --- linux-2.6.21-rc2-mm1-base.orig/kernel/sched.c 2007-03-06
> > 17:19:17.000000000 +1100 +++
> > linux-2.6.21-rc2-mm1-base/kernel/sched.c 2007-03-06 17:20:40.000000000
> > +1100 @@ -3444,7 +3444,7 @@ void scheduler_tick(void)
> >
> > update_cpu_clock(p, rq, now);
> >
> > - if (idle_at_tick)
> > + if (!idle_at_tick)
> > task_running_tick(rq, p);
> > #ifdef CONFIG_SMP
> > update_load(rq);
>
> Looks right, thanks. The original patch had
>
> - if (p == rq->idle)
> + if (idle_at_tick)
> /* Task on the idle queue */
> wake_priority_sleeper(rq);
> else
> task_running_tick(rq, p);
>
> but it got damaged by smt-nice removal.

I gathered something like that happened. If it wasn't clear this change caused
massive scheduler damage with no cpu accounting whatsoever occurring. I
recommend putting it in your hotfixes/ dir if you're not planning an -mm2
soon.

--
-ck
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/