public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Gerrit Huizenga <gh@us.ibm.com>,
	holzheu@linux.vnet.ibm.com, Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, mtk-manpages@gmx.net,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	"lf_kernel_messages@linux-foundation.org" 
	<lf_kernel_messages@linux-foundation.org>
Subject: Re: [RFC/PATCH] Documentation of kernel messages
Date: Fri, 15 Jun 2007 13:01:14 -0700	[thread overview]
Message-ID: <20070615200114.GA14130@suse.de> (raw)
In-Reply-To: <4672DFC7.20801@oracle.com>

On Fri, Jun 15, 2007 at 11:51:51AM -0700, Randy Dunlap wrote:
>  Gerrit Huizenga wrote:
> > On Thu, 14 Jun 2007 12:38:53 +0200, holzheu wrote:
> >> On Thu, 2007-06-14 at 11:41 +0200, Jan Kara wrote:
> >>>   <snip>
> >>>
> >>>> Your proposal is similar to one I made to some Japanese developers
> >>>> earlier this year.  I was more modest, proposing that we
> >>>>
> >>>> - add an enhanced printk
> >>>>
> >>>> 	xxprintk(msgid, KERN_ERR "some text %d\n", some_number);
> >>>   Maybe a stupid idea but why do we want to assign these numbers by hand?
> >>> I can imagine it could introduce collisions when merging tons of patches
> >>> with new messages... Wouldn't it be better to compute say, 8-byte hash
> >>> from the message and use it as it's identifier? We could do this
> >>> automagically at compile time.
> >> Of course automatically generated message numbers would be great and
> >> something like:
> >>
> >> hub.4a5bcd77: Detected some problem.
> >>
> >> looks acceptable for me.
> >>
> >> We could generate the hash using the format string of the printk. Since
> >> we specify the format string also in KMSG_DOC, the hash for the
> >> KMSG_DOC and the printk should match and we have the required link
> >> between printk and description.
> >>
> >> So technically that's probably doable.
> >>
> >> Problems are:
> >>
> >> * hashes are not unique
> >> * We need an additional preprocessor step
> >> * The might be people, who find 8 character hash values ugly in printks
> >>
> >> The big advantage is, that we do not need to maintain message numbers.
> >>
> >>> I know it also has it's problems - you
> >>> fix a spelling and the message gets a different id and you have to
> >>> update translation/documentation catalogue but maybe that could be
> >>> solved too...
> >> Since in our approach the message catalog is created automatically for
> >> exactly one kernel and the message catalog belongs therefore to exactly
> >> one kernel, I think the problem of changing error numbers is not too
> >> big.
> > We just had a meeting with the Japanese and several other participants
> > from the vendor and community side and came up with a potential proposal
> > that is similar to many things discussed here.  It has the benefit that
> > it seems implementable and low/no overhead on most kernel developers.
> > The basic proposal is to use a tool, run by the kernel Makefile to
> > extract kernel messages from either the kernel source or the .i files
> > (both have advantages, although I prefer the source to the .i file
> > since it 1) gets all messages and 2) is probably a little quicker with
> > less impact to the standard kernel make.
> > These messages would be stored in a file in the source tree, e.g.
> > usr/src/linux/Translations/English.  As each message is added to that
> > file, we calculate, say, an MD5 sum of the printk (dev_printk, sdev_printk,
> > etc.) string, and the text file ultimately contains:
> > MD5 Checksum of text; the printk text itself, the File name, the line 
> > number.
> > The checksum is run over just the printk.  We definitely would not include
> > the line number since the line number is too volatile.  Including the
> > file name in the hash *might* help disambiguate the hash a bit better in
> > the case of duplicates, but there was some debate that duplicates might
> > be better handled in other ways.
> > Andrew mentioned a mechanism for adding a subsystem tag or other tag
> > which helps disambiguate the message, either in the message file or in
> > the end user documentation (e.g. the Message Pedia/mPedia that the Japanese
> > have already created with ~350 messages, and a total of ~700 targetted
> > by the end of the year).
> > That tag could be appended to the beginning of the printk, to the end of
> > the printk, or even in a formatted comment at the end of the printk that
> > the tool could extract.
> > Then, the translations could be managed by anyone outside of the normal/
> > core kernel community, by simply creating a translation file, e.g.
> > usr/src/linux/Translations/Japanese, which contained the MD5 sum, the
> > translated message, the file name and line number (the last two redundent
> > perhaps but informational, and automatically generated if possible).
> > The files in the Translations directory could be uesd as the unique
> > keys for an external database (such as the Message Pedia, vendors or
> > distributions help pages, etc.) to help look up and explain root cause
> > of a problem.  The key property here is that the MD5 sum becomes the
> > key to all database entries to look up that key.
> > Further, yet another kernel config option could allow distros to output
> > the calculated MD5 sum to be printed, much like we do with timestamps
> > today.
> > End result is that these in-kernel message catalogs for translation are
> > updated automatically (mostly no kernel developer changes needed) and
> > the translations can be maintained by anyone who is interested.
> > On the topic of MD5 collisions, using a disambiguating tag would be a
> > simple addition for the few cases where that happens, the tool could
> > be educated to use that tag in the calculation of the MD5 sum, and we
> > have a 98% solution which impacts <1% of the kernel developers.
> > Folks present for this discussion included Ted T'so, James Bottomley,
> > several of the key Japenese folks interested in using this for debugging,
> > and reps from several vendors who would find this sort of info useful
> > for their folks supporting Linux in the field.
> > Comments?
> 
>  For those of us who have not been in on these meetings, I think that
>  some serious justifications are needed.  The last paragraph began to
>  go in that direction, but it needs to be more detailed and convincing.
>  And "for debugging" doesn't cut it IMO.

Full "justification" has never really been clear outside of the need to
try to duplicate what other Unixes have had for their support
departments in the past.  And yes, I've seen and sat through the
presentation by the Japanese group many different times, and talked to
the individual people who want this.

And you know, that's fine.  If anyone wants to go off and do such a
project like this, in a way that is almost entirely self-contained with
no affect on the development process or any kernel developer, I have no
objection to it at all.

And I think the proposal that Andrew made meets that requirement, so
let's wait and see what actual code comes out of this and judge it on
that merit at that time.

thanks,

greg k-h

  parent reply	other threads:[~2007-06-15 20:01 UTC|newest]

Thread overview: 133+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-13 15:06 [RFC/PATCH] Documentation of kernel messages holzheu
2007-06-13 16:37 ` Dave Hansen
2007-06-13 17:11   ` Sam Ravnborg
2007-06-13 17:42   ` holzheu
2007-06-13 16:50 ` Valdis.Kletnieks
2007-06-13 18:09   ` Rob Landley
2007-06-13 18:11   ` holzheu
2007-06-14  8:47     ` Krzysztof Halasa
2007-06-15  8:49   ` Jan Engelhardt
2007-06-13 17:16 ` Alexey Dobriyan
2007-06-13 17:46   ` holzheu
2007-06-13 17:51 ` Greg KH
2007-06-13 18:18   ` holzheu
2007-06-13 18:32     ` Greg KH
2007-06-13 18:49       ` Dave Hansen
2007-06-13 18:49       ` Kok, Auke
2007-06-14  8:17       ` Martin Schwidefsky
2007-06-13 19:04     ` Joe Perches
2007-06-14  2:54       ` Valdis.Kletnieks
2007-06-14  7:05         ` H. Peter Anvin
2007-06-15  8:51       ` Jan Engelhardt
2007-06-13 18:15 ` Andrew Morton
2007-06-14  8:31   ` Martin Schwidefsky
2007-06-14  9:41   ` Jan Kara
2007-06-14 10:38     ` holzheu
2007-06-14 11:47       ` holzheu
2007-06-14 12:26         ` Jan Kara
2007-06-14 15:22           ` holzheu
2007-06-15 18:42       ` Gerrit Huizenga
2007-06-15 18:51         ` Randy Dunlap
2007-06-15 19:27           ` Gerrit Huizenga
2007-06-15 20:01           ` Greg KH [this message]
2007-06-18 12:55         ` holzheu
2007-06-18 13:12           ` Arjan van de Ven
2007-06-18 13:33             ` Jan Kara
2007-06-18 13:53             ` holzheu
2007-06-19  1:36               ` Arjan van de Ven
2007-06-19  8:51                 ` holzheu
2007-06-19 19:24                   ` Arjan van de Ven
2007-06-19 11:31                 ` holzheu
2007-06-19  5:41           ` [Lf_kernel_messages] " Kunai, Takashi
2007-06-18 13:11         ` Sam Ravnborg
2007-06-18 15:35           ` Randy Dunlap
2007-06-19  0:13         ` Tim Bird
2007-06-19  3:52           ` Gerrit Huizenga
2007-06-15 12:40     ` Pavel Machek
2007-06-18 13:42       ` holzheu
2007-06-18 14:02         ` Pavel Machek
2007-06-25 13:48   ` Documentation of kernel messages (Summary) Michael Holzheu
2007-06-25 15:44     ` Rob Landley
2007-06-25 18:05       ` Sam Ravnborg
2007-06-27 15:11       ` Michael Holzheu
2007-07-09  5:15         ` Kunai, Takashi
2007-07-09  5:36           ` H. Peter Anvin
2007-07-09 16:48             ` Rob Landley
2007-07-09 17:18               ` Gerrit Huizenga
2007-07-10 16:12                 ` Rob Landley
2007-07-11 12:15                   ` Michael Holzheu
2007-07-11 14:26                   ` Li Yang
2007-07-11 18:13                     ` Rob Landley
2007-07-11 21:32                       ` Theodore Tso
2007-07-13 10:53                         ` Alan Cox
2007-07-13 12:49                           ` Li Yang
2007-07-13 13:43                             ` Theodore Tso
2007-07-13 13:25                           ` Stefan Richter
2007-07-13 21:10                             ` Valdis.Kletnieks
2007-07-13 18:05                           ` Rob Landley
2007-07-14  3:54                             ` Randy Dunlap
2007-07-15  1:56                               ` Rob Landley
2007-07-15 16:28                                 ` Randy Dunlap
2007-07-16 19:53                                   ` Rob Landley
2007-08-03 18:11                                     ` Randy Dunlap
2007-08-03 19:32                                       ` Rob Landley
2007-08-04  3:50                                         ` Greg KH
2007-08-04 19:02                                           ` Rob Landley
2007-08-04  3:52                                         ` Greg KH
2007-08-04 18:54                                           ` Rob Landley
2007-08-04 20:04                                             ` Stefan Richter
2007-08-06 15:50                                               ` Rob Landley
2007-07-11 21:53                       ` Valdis.Kletnieks
2007-07-12 16:56                         ` Rob Landley
2007-07-12 13:53                       ` Li Yang-r58472
2007-07-12 16:05                         ` [PATCH] Chinese Language Maintainer Rob Landley
2007-07-12 19:52                           ` Geert Uytterhoeven
2007-07-12 20:02                           ` Pavel Machek
2007-07-13  7:42                             ` Geert Uytterhoeven
2007-07-13 16:06                             ` Rob Landley
2007-07-13 12:43                           ` Li Yang
2007-07-13 17:52                             ` Rob Landley
2007-07-15 14:42                               ` Li Yang
2007-07-15 18:12                                 ` H. Peter Anvin
2007-07-15 18:50                                   ` Alan Cox
2007-07-15 19:11                                     ` H. Peter Anvin
2007-07-15 20:25                                       ` Rik van Riel
2007-07-16  4:40                                     ` Ganesan Rajagopal
2007-07-16 21:43                                       ` Alan Cox
2007-07-17  7:19                                         ` Ganesan Rajagopal
2007-07-15 18:53                                   ` Li Yang
2007-07-15 20:25                                   ` Rene Herman
2007-07-16  9:17                                   ` Dr. Keith G. Bowden
2007-07-16  2:49                                 ` Tsugikazu Shibata
2007-07-16  3:03                                   ` H. Peter Anvin
2007-07-17 16:24                                   ` Li Yang
2007-07-17 21:06                                     ` Rob Landley
2007-07-12 16:41                         ` Documentation of kernel messages (Summary) Tsugikazu Shibata
2007-07-12 17:35                         ` Rob Landley
2007-07-13  2:54                           ` Tsugikazu Shibata
2007-07-13 17:12                             ` Rob Landley
2007-07-14  1:46                               ` Tsugikazu Shibata
2007-07-15  2:12                                 ` Rob Landley
2007-07-15 16:46                                   ` Tsugikazu Shibata
2007-07-17 16:06                                     ` Rob Landley
2007-07-17 23:30                                       ` Tsugikazu Shibata
2007-07-13 11:54                           ` Li Yang
2007-07-15 20:30                             ` Rik van Riel
2007-07-09 18:33               ` Adrian Bunk
2007-07-10 16:25                 ` Rob Landley
2007-07-10 18:54                   ` Adrian Bunk
2007-07-10 19:53                     ` Rob Landley
2007-07-17  0:31                   ` Tim Bird
2007-07-17  1:17                     ` H. Peter Anvin
2007-07-17 16:42                       ` Rob Landley
2007-07-17 16:29                     ` Rob Landley
2007-07-10  7:59               ` Li Yang-r58472
2007-07-10  6:38             ` Dave Young
2007-07-09  7:01           ` Oliver Neukum
2007-07-09 22:59             ` Satyam Sharma
2007-07-10  6:15               ` Oliver Neukum
2007-07-09 18:10       ` [Lf_kernel_messages] " Theodore Tso
2007-07-09 22:12         ` Alan Cox
2007-07-10 16:50         ` Rob Landley
2007-06-13 18:23 ` [RFC/PATCH] Documentation of kernel messages David Miller
2007-06-13 18:27   ` holzheu

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=20070615200114.GA14130@suse.de \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=gh@us.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=holzheu@linux.vnet.ibm.com \
    --cc=jack@suse.cz \
    --cc=lf_kernel_messages@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk-manpages@gmx.net \
    --cc=randy.dunlap@oracle.com \
    --cc=schwidefsky@de.ibm.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