[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56D5A164.3000000@linaro.org>
Date: Tue, 1 Mar 2016 14:04:20 +0000
From: Daniel Thompson <daniel.thompson@...aro.org>
To: Petr Mladek <pmladek@...e.com>
Cc: Jiri Kosina <jikos@...nel.org>,
Russell King - ARM Linux <linux@....linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
the arch/x86 maintainers <x86@...nel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"adi-buildroot-devel@...ts.sourceforge.net"
<adi-buildroot-devel@...ts.sourceforge.net>,
Cris <linux-cris-kernel@...s.com>,
Linux MIPS Mailing List <linux-mips@...ux-mips.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
linux-s390 <linux-s390@...r.kernel.org>,
Linux-sh list <linux-sh@...r.kernel.org>,
sparclinux <sparclinux@...r.kernel.org>
Subject: Re: [PATCH v3 4/4] printk/nmi: Increase the size of NMI buffer and
make it configurable
On 18/12/15 17:00, Daniel Thompson wrote:
>>> The MCE handlers should only call printk() when they decide to panic
>>> and *after* busting the spinlocks. At this point deferring printk()
>>> until it is safe is not very helpful.
>>>
>>> When we bust the spinlocks we should probably restore the normal
>>> printk() function to give best chance of the failure messages making
>>> it out.
>>
>> The problem is that we do not know what locks need to be busted. There
>> are too many consoles and too many locks involved. Also busting locks
>> open another can of worms.
>
> Yes, I agree that busting the spinlocks doesn't avoid all risk of deadlock.
>
> Probably I've been placing too much weight on the importance of getting
> messages out when dying. You're right that surviving far enough through
> a panic to trigger kdump or reset is equally (or more) important in many
> scenarios than getting a failure message out.
>
> However on a system with nothing but "while(1) {}" hooked up to panic()
> then its worth risking a lock up. In this case restoring normal printk()
> behavior and dumping the NMI buffers would be worthwhile.
An a (much) later thread[1] Andrew Morton described this comment as
non-committal. Sorry for that.
I don't object to the overall approach taken by Petr, merely that I
think there are cases where the current patchset doesn't put in quite
enough effort to issue messages.
Panic triggered during NMI is the only case I can think of and that, I
think, could be addressed by adding an extra call to printk_nmi_flush()
during panic(). It should probably only cover cases where we *don't*
call kdump and the panic handler doesn't restart the machine... so just
after the pr_emerg("...end kernel panic") would be OK for me.
Daniel.
[1]: http://thread.gmane.org/gmane.linux.ports.arm.kernel/482845
Powered by blists - more mailing lists