Re: [RFC PATCH] printk: Change timestamp to triplet as mono, boot and real
From: Petr Mladek
Date: Tue Aug 11 2020 - 09:02:22 EST
On Tue 2020-08-11 14:05:12, Thomas Gleixner wrote:
> Petr Mladek <pmladek@xxxxxxxx> writes:
> > At least "crash" tool would need an update anyway. AFAIK, it checks
> > the size of struct printk_log and refuses to read it when it changes.
> >
> > It means that the hack with VMCOREINFO_FIELD_OFFSET probably is not
> > needed because we would need to update the crashdump-related tools anyway.
> >
> > Well, the timing is good. We are about to switch the printk ring
> > buffer into a lockless one. It requires updating the crashdump tools
> > as well. We could do this at the same time. The lockless ring buffer
> > already is in linux-next. It is aimed for 5.10 or 5.11.
> ...
> > It would be great to synchronize all these changes changes of the
> > printk log buffer structures.
>
> I agree that having one update is a good thing, but pretty please can we
> finally make progress with this and not create yet another dependency?
To make it clear. I definitely do not want to block lockless printk by
this.
BTW: I am not 100% convinced that storing all three timestamps is
worth it. It increases the code complexity, metadata size. It needs
an interface with the userspace that has to stay backward compatible.
Also it still will be racy because the timestamp is taken when the message
is printed. It might be "long" before or after the event that
it talks about.
There is still the alternative to print all three timestamps regularly
for those interested. It is less user convenient but much easier
to maintain.
Best Regards,
Petr