[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181210094554.z5n7dmkrnlcpygg4@shbuild888>
Date: Mon, 10 Dec 2018 17:45:54 +0800
From: Feng Tang <feng.tang@...el.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Petr Mladek <pmladek@...e.com>, akpm@...ux-foundation.org,
bp@...e.de, keescook@...omium.org, mm-commits@...r.kernel.org,
sergey.senozhatsky@...il.com, stable@...r.kernel.org,
tglx@...utronix.de, Steven Rostedt <rostedt@...dmis.org>,
Sasha Levin <sashal@...nel.org>,
Andi Kleen <ak@...ux.intel.com>, linux-kernel@...r.kernel.org
Subject: Re: + panic-avoid-the-extra-noise-dmesg.patch added to -mm tree
Hi Sergey,
+ lkml.
On Fri, Dec 07, 2018 at 06:50:04PM +0900, Sergey Senozhatsky wrote:
> On (12/06/18 11:58), Feng Tang wrote:
> > > Same here, I tried on several platforms and hardly get the sysrq magic key
> > > working, though it works while system is running.
> > >
> > > And it make me wondering if those workqueue dependent led blinking code
> > > can still really work.
> >
> > Also, IMHO, if we need a panic blink method, it should better be simple
> > and robust with only HW registers access plus delay function, as I'm not
> > sure if the scheduling can still work.
> >
> > Anyway, can I propose to make the "local_irq_enable" conditional and off
> > by default, and add a warning.
>
> I'm not sure what to do about this. I think that the behaviour is platform
> specific. For instance, arm64 keeps secondary CPUs in a busy loop
> while (1)
> cpu_relax();
Yes, it's similar to x86's handling for non-panic CPU.
>
> (masked out) and on panic_cpu disables only SDEI (interrupts from firmware,
> if I got it right); so it seems that arm64 can handle IRQs after panic. And
> if there are platforms that handle IRQ (including sysrq) after panic, then
> both options - making printk a noop or keeping local irqs off - maybe can
> cause some problems. Or maybe not. We better ask arch people.
Yes, this is very valid concern. And after Petr and you raised it, I did
some experiments with 3 x86 platforms at my hand, one Apollolake IOT device
with serial console, one IvyBridge laptop and one Kabylake NUC, the magic key
all works well before panic, and fails after panic. But I did remember the
PageUp/PageDown key worked on some laptop years ago. And you actually raised a
good question: what do we expect for the post-panic kernel?
For the v4 patch, my thought is, for experienced developers to make
sysrq/panic_blink work, it's easy to add "panic_keep_irq_on" to kernel cmdline,
or runtime change it by
"echo Y > /sys/module/kernel/parameters/panic_keep_irq_on"
while for normal user, they can by default see the clean panic call stack
either on a screen or a serial console.
Thanks,
Feng
>
> Personally, on my x86 laptop, I'd prefer the srollback to work after panic.
> Just my 5 cents.
>
> -ss
Powered by blists - more mailing lists