linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Changki Kim <changki.kim@samsung.com>,
	sergey.senozhatsky@gmail.com, rostedt@goodmis.org,
	changbin.du@intel.com, masahiroy@kernel.org, rd.dunlap@gmail.com,
	gregkh@linuxfoundation.org, krzk@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: printk: Add process name information to printk() output.
Date: Mon, 7 Sep 2020 17:47:14 +0200	[thread overview]
Message-ID: <20200907154713.GE8084@alley> (raw)
In-Reply-To: <87d02xj2ui.fsf@jogness.linutronix.de>

On Mon 2020-09-07 12:36:45, John Ogness wrote:
> On 2020-09-07, Petr Mladek <pmladek@suse.com> wrote:
> > This extra metadata are not currently read by crashdump tools.
> 
> crash [0] prints dictionary data.
> [0] https://github.com/crash-utility/crash

Grr, I have missed this. It makes things more complicated.

We need to find a way that would allow to add more metadata without
breaking support for the existing ones.

I know, it works with the current dictionary. "crash" just prints it
the same way as "cat /dev/kmsg". Dict entries are printed on separate
lines. It is better than nothing. But it is not much user friendly.

If we add more metadata, people would want to see it some more
userfriendly way, e.g.:

	[2020-08-20T07:58:48][  T136] random: crng init done

instead of

	[    1.394073] random: crng init done
	 PID = 136
	 CPU = 3
	 IRQ_CONTEXT = 0;
	 TS_MONO = 234632423
	 TS_REAL = 1599211091487260162
	 [...]

For this, "crash" would need to understand the different variables
stored in dictionary. So, it would become harder to change
the format as well.


Anyway, "crash" could get the information about struct printk_ext_info
via VMCOREINFO_STRUCT_SIZE(), VMCOREINFO_OFFSET() macros.
We could extend the structure if we do not change the format
of the existing items.

I am not 100% sure that the array of struct printk_ext_info is the
best solution. But I still somehow like it more than dict ring. IMHO,
it is more reliable and much easier to work with on the kernel side.

Best Regards,
Petr

  reply	other threads:[~2020-09-07 15:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200904082449epcas2p4420d5df2083325b328a182c79f5c0948@epcas2p4.samsung.com>
2020-09-04  8:24 ` printk: Add process name information to printk() output Changki Kim
2020-09-04  9:05   ` Greg KH
2020-09-04  9:31     ` 김창기
2020-09-04 10:34       ` 'Greg KH'
2020-09-07  1:48         ` 김창기
2020-09-04  9:47   ` John Ogness
2020-09-04 10:35     ` Greg KH
2020-09-04 19:27       ` Joe Perches
2020-09-04 12:45     ` Petr Mladek
2020-09-04 13:17       ` John Ogness
2020-09-04 15:13         ` Petr Mladek
2020-09-04 23:27           ` John Ogness
2020-09-07  9:28             ` 김창기
2020-09-07  9:54             ` Petr Mladek
2020-09-07 10:30               ` John Ogness
2020-09-07 15:47                 ` Petr Mladek [this message]
2020-09-11  9:50       ` [POC] printk: Convert dict ring into array Petr Mladek
2020-09-11 10:32         ` Petr Mladek
2020-09-11 11:09           ` John Ogness

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200907154713.GE8084@alley \
    --to=pmladek@suse.com \
    --cc=changbin.du@intel.com \
    --cc=changki.kim@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.ogness@linutronix.de \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=rd.dunlap@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).