[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080407223540.GI16647@one.firstfloor.org>
Date: Tue, 8 Apr 2008 00:35:40 +0200
From: Andi Kleen <andi@...stfloor.org>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Andi Kleen <andi@...stfloor.org>, Jiri Kosina <jkosina@...e.cz>,
Zdenek Kabelac <zdenek.kabelac@...il.com>,
Kernel development list <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: BUG: using smp_processor_id() during suspend with 2.6.25-rc8
On Tue, Apr 08, 2008 at 12:29:30AM +0200, Rafael J. Wysocki wrote:
> On Tuesday, 8 of April 2008, Andi Kleen wrote:
> > On Tue, Apr 08, 2008 at 12:11:17AM +0200, Jiri Kosina wrote:
> > > On Tue, 8 Apr 2008, Andi Kleen wrote:
> > >
> > > > > I know. However preempt_count is a little bit inconsistent in such cases
> > > > > though.
> > > > And? interrupts off beats preempt count anyways. Why did you write the
> > > > patch? Was there a (incorrect) warning triggered?
> > >
> > > Reported at http://lkml.org/lkml/2008/4/7/130
> > >
> > > BTW is also mce_init() (called from mce_resume()) guaranteed to run with
> > > IRQs off?
> >
> > [cc rafael]
> >
> > The mce resume is a sysdev.
> >
> > sysdevs were always supposed to run completely with interrupts off. If they
> > don't anymore that's some kind of higher level resume code bug which you need
> > to fix there, not hack around in the low level code.
>
> They are executed with interrupts disabled, on one CPU.
Well then someone enables them incorrectly, see the report above.
>
> > If it does that it likely broke more code too.
> >
> > Obviously turning on preemption anywhere around the machine check is
> > fatal because it touches CPU state and if you reschedule you could
> > switch to another CPU and change or access the wrong CPU's state.
>
> FWIW, at the point when sysdevs are resumed we are single-threaded.
You mean single CPUed? Even a single thread could switch to another CPU.
-Andi
--
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