public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, yrl.pp-manager.tt@hitachi.com,
	akpm@linux-foundation.org, gregkh@linuxfoundation.org,
	kay@vrfy.org, davem@davemloft.net, itoukzo@nttdata.co.jp
Subject: Re: Re: [RESEND RFC PATCH 0/5] Add a hash value for each line in /dev/kmsg
Date: Fri, 26 Jul 2013 21:13:02 +0900	[thread overview]
Message-ID: <51F267CE.1040008@hitachi.com> (raw)
In-Reply-To: <1374771118.1957.8.camel@joe-AO722>

Hello,

(2013/07/26 1:51), Joe Perches wrote:> On Thu, 2013-07-25 at 17:37 +0900, Hidehiro Kawai wrote:
>> ================
>> This patch series adds hash values of printk format strings into
>> each line of /dev/kmsg outputs as follows:
>>
>>         6,154,325061,-,b7db707c@kernel/smp.c:554;Brought up 4 CPUs
>>
>> These hash values allow use space to identify messages easily and
>> do valuable things.  There is no guarantee that the hash values
>> are unique.  However, user space can know which one collides to
>> others from a message-and-hash catalog generated at build time, so
>> finally it should be able to identify the messages.  User space
>> can also use filename:lineno information to do that, although the
>> information is not portable among various kernel versions.
>>
>>
>> Background
>> ==========
>> We sometimes want to identify each kernel message automatically
>> because of the following purposes:
>>
>> (1) Show more detailed information about the message by cooperating
>>     with external system
>> (2) Take actions automatically depending on the message, for example
>>     trigger a fail over or collect related information to analyze the
>>     problem
>
> If there are really "take action" uses, perhaps
> it'd be better to mark the specific areas of code
> where this needs to be done and add a notifier
> function there instead of depending on post effect
> processing.

It is one of the solution if we can add such notifiers easily, but I think
it's not true.  Adding a notifier means that it gives the portion of
the codes fixed meaning.  This is similar to adding a tracepoint.
Maintainer and developers have to keep the meaning consistent, but they
wouldn't like to do that so much.  Moreover, events users want to
handle differ depending on users and system vendors.  As the result,
we would have to add many notifiers into many places.

On the other hand, printk message handling is a flexible, readily
available and multipurpose way.

Regards,
-- 
Hidehiro Kawai
Hitachi, Yokohama Research Laboratory
Linux Technology Center



  reply	other threads:[~2013-07-26 12:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25  8:37 [RESEND RFC PATCH 0/5] Add a hash value for each line in /dev/kmsg Hidehiro Kawai
2013-07-25  8:37 ` [RESEND RFC PATCH 3/5] tools/include: Add jhash.h Hidehiro Kawai
2013-07-25  8:37 ` [RESEND RFC PATCH 5/5] printk: Add msghash support for dev_printk Hidehiro Kawai
2013-07-25  8:37 ` [RESEND RFC PATCH 2/5] printk: add message hash values in /dev/kmsg output Hidehiro Kawai
     [not found]   ` <CAEBb_QC3FgBuvnihvj4+xUYKCQX-KnLtW3203GDv-ByiOGsa-g@mail.gmail.com>
2013-07-26 12:10     ` Hidehiro Kawai
2013-07-25  8:37 ` [RESEND RFC PATCH 1/5] printk: make printk a macro Hidehiro Kawai
2013-07-25  8:37 ` [RESEND RFC PATCH 4/5] msghash: Add userland msghash tool Hidehiro Kawai
2013-07-25 16:51 ` [RESEND RFC PATCH 0/5] Add a hash value for each line in /dev/kmsg Joe Perches
2013-07-26 12:13   ` Hidehiro Kawai [this message]
     [not found] ` <CAEBb_QCkTc++pOpv83xdgnZgeUDa1-QK8McY6yqwe2wZN3zt5g@mail.gmail.com>
2013-07-26 12:04   ` Hidehiro Kawai

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=51F267CE.1040008@hitachi.com \
    --to=hidehiro.kawai.ez@hitachi.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=itoukzo@nttdata.co.jp \
    --cc=joe@perches.com \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yrl.pp-manager.tt@hitachi.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