Re: [POC] printk: Convert dict ring into array

From: Petr Mladek
Date: Fri Sep 11 2020 - 06:32:23 EST


On Fri 2020-09-11 11:50:35, Petr Mladek wrote:
> This is POC how the printk() code would look when dict ring
> gets converted into an array of extended info structures.
>
> It applies on top of the patchset ("[PATCH printk v4 0/6]
> printk: reimplement LOG_CONT handling"), see
> https://lore.kernel.org/r/20200908202859.2736-1-john.ogness@xxxxxxxxxxxxx
>
> It compiles and even seems to work. But it would need quite
> some love and discussion to get ready for merging.

[...]

> Well, there is only small step to bundle these values into the existing
> struct printk_info.

My opinion:

I would like to go this way in the long term because it looks like the most
easy and reliable solution. But I do _not_ want to block pushing printk
rework [0][1] into mainline because of this.

Handling more information for each stored message is tangential to the
printk rework. It would make it easier for crashdump related tools
when the log buffer format is not modified many times. But it
might block the rework indefinitely.

The lockless ringbuffer is almost ready for merging into mainline.
It will be a huge change on its own. The printk rework is very
important effort. It is cleaning up the printk design and
helps with many historical problems, like deadlocks or soft-lockups.

I do not want to complicate it much more with adding more meta
information and yet another format change that would deserve
more investigation and discussion.

[0] https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git/log/?h=printk-rework
[1] https://lore.kernel.org/r/20200908202859.2736-1-john.ogness@xxxxxxxxxxxxx

Best Regards,
Petr