From: Greg KH <gregkh@linuxfoundation.org>
To: Changki Kim <changki.kim@samsung.com>
Cc: pmladek@suse.com, sergey.senozhatsky@gmail.com,
rostedt@goodmis.org, john.ogness@linutronix.de,
changbin.du@intel.com, masahiroy@kernel.org, rd.dunlap@gmail.com,
krzk@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: printk: Add process name information to printk() output.
Date: Fri, 4 Sep 2020 11:05:35 +0200 [thread overview]
Message-ID: <20200904090535.GA2440145@kroah.com> (raw)
In-Reply-To: <20200904082438.20707-1-changki.kim@samsung.com>
On Fri, Sep 04, 2020 at 05:24:38PM +0900, Changki Kim wrote:
> Printk() meesages are the most basic and useful debug method.
> However, additional information needs in multi-processor.
> If we add messages with processor id and process name, we can find
> a problem only with messages when the problem occurs with H/W IP or CPU.
> This is very useful in narrowing down the scope of the problems.
>
> Therefore, instead of trying to help buffering, let's try to help
> reconstructing messages by saving caller information as of calling
> log_store() and adding it as "[$processor_id: $process_name: $thread_id]"
> upon printing to consoles.
>
> Some examples for console output:
>
> [ 0.059580] [0: swapper/0: 1] CPU: All CPU(s) started at EL1i
> [ 2.153157] [5: init: 1] migov: complete to probe migov
> [ 7.441317] [4: init: 1] NET: Registered protocol family 39
> [ 22.793389] [5: kworker/u16:1: 184] SMP: stopping secondary CPUs
>
> Signed-off-by: Changki Kim <changki.kim@samsung.com>
> ---
> kernel/printk/printk.c | 20 ++++++++++++++++++--
> kernel/printk/printk_ringbuffer.h | 7 +++++++
> lib/Kconfig.debug | 16 ++++++++++++++++
> 3 files changed, 41 insertions(+), 2 deletions(-)
Isn't the CPU number already present if you want it today? Why add it
again?
thanks,
greg k-h
next prev parent reply other threads:[~2020-09-04 9:05 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 [this message]
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
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=20200904090535.GA2440145@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=changbin.du@intel.com \
--cc=changki.kim@samsung.com \
--cc=john.ogness@linutronix.de \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=pmladek@suse.com \
--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).