[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150610153253.GJ3644@twins.programming.kicks-ass.net>
Date: Wed, 10 Jun 2015 17:32:53 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Petr Mladek <pmladek@...e.cz>
Cc: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
jkosina@...e.cz, paulmck@...ux.vnet.ibm.com,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH] printk: Fixup the nmi printk mess
You are aware that you can delete bits of the email that are not
relevant, right?
On Wed, Jun 10, 2015 at 04:57:37PM +0200, Petr Mladek wrote:
> Also note that show_regs() calls many separate printk()s, the irqwork
> is scheduled by the first one => it is quite likely that some
> backtrace will get messed.
The irq_work is only ever called when we're inside an NMI, the irq_work
will only ever execute once that NMI is done -- on that CPU.
How will that miss anything?
> Anothrer problem is that __printk_nmi_flush() is per-CPU => more
> instances might be running in parallel. I haven't tested this but
> I quess that it will mix backtraces from different CPUs in
> the main ring buffer.
Correct, such is the life of printk().
> Note that the backtraces used to be serialized via
> static arch_spinlock_t lock = __ARCH_SPIN_LOCK_UNLOCKED
> in the past. See the commit
> a9edc8809328 ("x86/nmi: Perform a safe NMI stack trace on all CPUs")
We could easily add a static raw_spinlock_t to __printk_nmi_flush() and
serialize its invocations if people think that is important.
--
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