Re: [PATCH] print kdump kernel loaded status in stack dump

From: Dave Young
Date: Fri Jan 19 2018 - 03:42:40 EST


On 01/19/18 at 05:28pm, Sergey Senozhatsky wrote:
> On (01/19/18 16:16), Dave Young wrote:
> > On 01/19/18 at 02:45pm, Sergey Senozhatsky wrote:
> > > On (01/18/18 10:02), Andi Kleen wrote:
> > > > Dave Young <dyoung@xxxxxxxxxx> writes:
> > > > > printk("%sHardware name: %s\n",
> > > > > log_lvl, dump_stack_arch_desc_str);
> > > > > + if (kexec_crash_loaded())
> > > > > + printk("%skdump kernel loaded\n", log_lvl);
> > > >
> > > > Oops/warnings are getting longer and longer, often scrolling away
> > > > from the screen, and if the kernel crashes backscroll does not work
> > > > anymore, so precious information is lost.
> > >
> > > true. I even ended up having a console_reflush_on_panic() function. it
> > > simply re-prints with a delay [so I can at least read the oops] logbuf
> > > entries every once in a while, staring with the first oops_in_progress
> > > record.
> > >
> >
> > If too many messages printed on screen, then the next flush will
> > still scroll up.
>
> right. but it re-prints Oops with a new console_unlock_delay() delay
> which gives me enough time to either read it as many times as I want,
> or take a picture, etc. it's not as fast as the normal oops print out.
>
> [I'm not entirely sure I see why do we have printk_delay() in
> vprintk_emit()... I mean I probably can see some reasoning behind
> it, but at the same it makes sense to slow down console_unlock()
> as well]

Looks like I am the guy who added the code :) Actually no special
reason, just did not thinking about the performance issue at all at that
time..

>
> -ss