From: holzheu <holzheu@linux.vnet.ibm.com>
To: Valdis.Kletnieks@vt.edu
Cc: linux-kernel@vger.kernel.org, randy.dunlap@oracle.com,
akpm@osdl.org, gregkh@suse.de, mtk-manpages@gmx.net,
schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com
Subject: Re: [RFC/PATCH] Documentation of kernel messages
Date: Wed, 13 Jun 2007 20:11:17 +0200 [thread overview]
Message-ID: <1181758277.26375.17.camel@localhost.localdomain> (raw)
In-Reply-To: <17542.1181753455@turing-police.cc.vt.edu>
Hi Valdis,
On Wed, 2007-06-13 at 12:50 -0400, Valdis.Kletnieks@vt.edu wrote:
> On Wed, 13 Jun 2007 17:06:57 +0200, holzheu said:
> > They are used to that, because all other operating systems on that
> > platform like z/OS, z/VM or z/VSE have message catalogs with detailed
> > descriptions about the semantics of the messages.
>
> 25 years ago, I did OS/MVT and OS/VS1 for a living, so I know *all* about
> the infamous "What does IEF507E mean again?"...
:-)
> > In general we think, that also for Linux it is a good thing to have
> > documentation for the most important kernel/driver messages. Even
> > kernel hackers not always are aware of the meaning of kernel messages
> > for components, which they don't know in detail. Most of the messages
> > are self explaining but sometimes you get something like "Clocksource
> > tsc unstable (delta = 7304132729 ns)" and you wonder if your system is
> > going to explode.
>
> This is probably best addressed by cleaning up the actual messages so they're
> a bit more informative.
Of course that would be good, too.
But I think, that we sometimes have the dilemma, that we want to keep
the printks short, but also want to provide as much information as
possible.
If the information is to big for the printk itself, because you would
need 10 lines to explain what happened, wouldn't it be good to have a
place where to put that information?
> > New macros KMSG_ERR(), KMSG_WARN(), etc. are defined, which have to be
> > used in printk. These macros have as parameter the message number and
> > are using a per c-file defined macro KMSG_COMPONENT.
>
> Gaak. *NO*.
>
> The *only* reason that the MVS and VM message catalogs worked at all is
> because each component had a message repository that went across *all* the
> source files - the instant you saw IEFnnns, you knew that IEF covered the
> job scheduler, nnn was a *unique* number, and s was a Severe/Warning/Info
> flag. IGG was always data management, and so on. This breaks horribly if
> you have 2 C files that define subtly different KMSG_COMPONENT values (or
> even worse, 2 or more duplicates).
>
> [/usr/src/linux-2.6.22-rc4-mm2] find . -name '*.c' | wc -l
> 9959
> [/usr/src/linux-2.6.22-rc4-mm2] find . -name '*.h' | wc -l
> 9933
> [/usr/src/linux-2.6.22-rc4-mm2] find . -type d | wc -l
> 1736
>
> You plan to maintain message uniqueness how?
> [/usr/src/linux-2.6.22-rc4-mm2]1 find . -name '*.c' | sed -r 's?.*/([^/]*)?\1?' | sort | uniq -c | sort -nr | head
> 105 setup.c
> 90 irq.c
> 66 time.c
> 58 init.c
> 50 inode.c
> 39 io.c
> 38 pci.c
> 37 file.c
> 32 signal.c
> 32 ptrace.c
>
> Looks like you're going to have to embed a lot of the path in that KMSG_COMPONENT
> to make it unique - and you want to keep that message under 80 or so chars total.
>
For each kernel component, like a device driver, we could have one
KMSG_COMPONENT (e.g. "acpi", "pci", etc). Within that component the
message ids have to be unique. A tool could check, if messages are
unique within the kernel sources.
We could use something like a Documentation/kmsg-components file with a
list of all component names using KMSG printks.
> > /**
> > * message
> > * @0: device number of device.
> > *
> > * Description:
> > * An operation has been performed on the msgtest device, but the
> > * device has not been set online. Therefore the operation failed
>
> If you don't understand 'Device /dev/foo offline', this description
> doesn't help any. And that's true for *most* of the kernel messages
> already - if you don't understand the message already, a paragraph
> explanation isn't going to help much. Consider the average OOPS
> message, which contains stuff like 'EIP=0x..'. Telling the user that
> EIP means Execution Instruction Pointer isn't likely to help - if they
> knew what the pointer *did*, they'd probably already know EIP.
I agree with you, that most of the kernel messages do not need further
documentation. But I am convinced, that there are plenty of printks,
where additional documentation would be helpful.
> > *
> > * User Response:
> > * Operator should set device online.
> > * Issue "chccwdev -e <device number>".
>
> And this is where the weakness of this scheme *really* hits. I've actually run
> into cases where an operator followed the listed "Operator Response" for a
> "device offline", and issued a 'VARY 0C0,ONLINE'. And then we got a flood of
> I/O errors because the previous shift downed the device because it was having
> issues. The response the operator *should* have done is "assign a different
> tape drive, like, oh maybe the operational ones at 0C1 through 0C4"...
I can understand your frustration here. But that's a general problem
with documentation. You never can foresee everything.
But should this mean, that we shouldn't document anything?
Michael
next prev parent reply other threads:[~2007-06-13 18:14 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 [this message]
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
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=1181758277.26375.17.camel@localhost.localdomain \
--to=holzheu@linux.vnet.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=heiko.carstens@de.ibm.com \
--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