Re: [BUG] kernel freezes with latest tree

From: Eric Dumazet
Date: Tue Jan 10 2012 - 11:37:30 EST


Le mardi 10 janvier 2012 Ã 08:28 -0800, Linus Torvalds a Ãcrit :
> On Tue, Jan 10, 2012 at 8:13 AM, Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
> >
> > Here are two traces of the lockups, since I had some free time to reproduce the
> > bug on current tree (plus a minor change in bnx2 driver to avoid a
> > netconsole related stack trace)
>
> Hmm. You have load_balance() and idle_balance() there in the trace, so
> I'm getting more hopeful that it really is just the fact that
> set_cpu_sd_state_idle() really needs to just be run with interrupts
> disabled. That was my main concern about that merge, so if it's that,
> I'll be relieved.
>
> If you can please try that change out, that would be great.
>
> [ And if that's not it - Ingo & co, please check out the traces on lkml ]
>

Just to make sure I understood well, here is what I tested :


diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 7656642..acd88a1 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -466,6 +466,8 @@ void tick_nohz_idle_enter(void)

WARN_ON_ONCE(irqs_disabled());

+ local_irq_disable();
+
/*
* Update the idle state in the scheduler domain hierarchy
* when tick_nohz_stop_sched_tick() is called from the idle loop.
@@ -474,8 +476,6 @@ void tick_nohz_idle_enter(void)
*/
set_cpu_sd_state_idle();

- local_irq_disable();
-
ts = &__get_cpu_var(tick_cpu_sched);
/*
* set ts->inidle unconditionally. even if the system did not


--
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/