Re: [RFC PATCH v4 9/9] printk: use a new ringbuffer implementation

From: Thomas Gleixner
Date: Fri Aug 09 2019 - 16:07:41 EST

On Fri, 9 Aug 2019, Linus Torvalds wrote:
> On Fri, Aug 9, 2019 at 4:15 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> >
> > >
> > > But I don't know what a power-off-in-laptop scenario really looks like..
> >
> > That's random behaviour. It's hardware & BIOS & value add. What do you
> > expect?
> >
> > I tried on a few machines. My laptop does not retain any useful information
> > and on some server box (which takes ages to boot) the memory is squeaky
> > clean, i.e. the BIOS wiped it already. Some others worked with a two second
> > delay between turning the remote power switch on and off.
> You were there at the Intel meeting, weren't you?


> This is all about the fact that "we're not getting sane and reliable
> debug facilities for remote debugging". We haven't gotten them over
> two decades, we're not seeing it in the future either.

I know. It sucks.

> So what if we _can_ get an ACPI update and in the next decade your
> laptop _will_ have a memory area that doesn't get scribbled over?

No argument here.

> Does it work today? Yes it does, but only for very special cases
> (basically warm reboot with "fast boot" enabled).
> But they are special cases that may be things that can be extended
> upon without any actual hardware changes.

I'm all for it. I just tried it out and the ratio was 3 out of 5 retained
the data +/- a few bitflips with ~2 seconds power off. The other two were
the laptop and that server machine which wipes everything.

If that can be avoided with some ACPI tweak especially on the laptop, that
would be great. I'm not so worried about the server case.

Debugging laptops and random client machines is the real interesting use
case. They usually lack serial and even if they have serial then the
reporter has not necessarily a second machine to capture the stuff.