public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	cgl_discussion mailing list <cgl_discussion@osdl.org>,
	evlog mailing list <evlog-developers@lists.sourceforge.net>,
	"ipslinux (Keith Mitchell)" <ipslinux@us.ibm.com>,
	Linus Torvalds <torvalds@home.transmeta.com>,
	Hien Nguyen <hien@us.ibm.com>,
	James Keniston <kenistoj@us.ibm.com>,
	Mike Sullivan <sullivam@us.ibm.com>
Subject: alternate event logging proposal
Date: Tue, 24 Sep 2002 15:48:19 -0400	[thread overview]
Message-ID: <3D90C183.5020806@pobox.com> (raw)
In-Reply-To: 20020924073051.363D92C1A7@lists.samba.org

Here's my suggestion, which will maintain compatibility with 2.2 and 2.4 
kernels, and require a -very- minimal kernel update, to support event 
logging.

When CONFIG_EVLOG is defined, printk outputs a tagged ASCII format: 
KERN_xxx, the format string (verbatim), and 0 or more argument values. 
Since this loses the argument tags (names) from the current IBM event 
logging code, you can re-gain this info by post-processing the printk. 
Post-processing can be done by a hacked cpp (see http://www.tinycc.org/ 
for a tiny, steal-able one) or a simple Perl script.

The only real difference at that point between IBM's implementation and 
my proposal is that some argument tags are expressions, not simple C 
identifiers (flag ? "true" : "false") instead of "flag".  This is a 
problem if you want to do SQLish queries on the tags in the event log, 
but its a work-around-able problem, IMO.

This scheme should fit with the backend code already created by IBM, 
which isn't too bad IMO.

Even if the details are disagreeable, I really think that we should work 
towards making printk (or 'warn', 'error', etc.) log the desired 
information, while still keeping older drivers useful, and keeping 
drivers source-compatible with older kernels.


Now, turning to a tangent topic that relates to either scheme...

With either your proposal or mine, event logging is far more useful if 
similar drivers spit out similar diagnostics.  i.e. it's less useful if 
8139too net driver spits out 'status16' in one interrupt event, and 
8139cp net driver spits out 'status32' in another.  Though they are 
different hardware and the values mean different things, my point is the 
concepts are similar, and thus better diagnostics are achieved with 
subsystem diagnostic standards.

Such standards are in actuality independent of event logging per se, but 
if IBM wants to push this thing, I would like to see some proposals as 
to what IBM actually wants drivers to log.  I have not seen that at all, 
and think that such proposals should be an integral part of an event 
logging system.  Otherwise the diagnostics are less useful, and IBM 
would have failed to demonstrate an adequate grasp of the problem domain 
[which then leads to other, typical software engineering problems...]

"What do you want to log?" is as important to me as "how do you want to 
log it?"  And the answers to the two questions are very much intertwined.

Comments?

	Jeff




  reply	other threads:[~2002-09-24 19:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-24  1:54 [PATCH-RFC} 3 of 4 - New problem logging macros, plus template generation Larry Kessler
2002-09-24  2:12 ` Jeff Garzik
2002-09-24  5:47   ` Rusty Russell
2002-09-24  6:05     ` Jeff Garzik
2002-09-24  7:06       ` Rusty Russell
2002-09-24  7:23         ` Jeff Garzik
2002-09-24  7:30           ` Rusty Russell
2002-09-24 19:48             ` Jeff Garzik [this message]
2002-09-24 19:57               ` alternate event logging proposal Chris Friesen
2002-09-24 20:03                 ` Jeff Garzik
2002-09-24 20:54                   ` Tim Hockin
2002-09-24 22:32                     ` Brad Hards
2002-09-24 23:31                       ` Jeff Garzik
2002-09-24 23:37                         ` Brad Hards
2002-09-24 23:59                           ` Tim Hockin
2002-09-24 23:38                         ` Tim Hockin
2002-09-25  0:09                           ` Ben Greear
2002-09-25  0:47                             ` Tim Hockin
2002-09-25  1:14                               ` Brad Hards
2002-09-25  1:38                                 ` Tim Hockin
2002-09-24 20:09                 ` Jeff Garzik
2002-09-24 20:27                   ` [evlog-dev] " Larry Kessler
2002-09-24 20:35                     ` Jeff Garzik
2002-09-24 21:11                       ` Larry Kessler
2002-09-24 21:26                         ` Jeff Garzik
2002-09-25  0:15                           ` Larry Kessler
2002-09-24 21:27                         ` Horst von Brand
2002-09-24 21:50                           ` Larry Kessler
2002-09-25 14:44                 ` Lars Marowsky-Bree
2002-09-24 20:54               ` [evlog-dev] " Daniel E. F. Stekloff
2002-09-24 21:04                 ` Jeff Garzik
2002-09-30 22:43                 ` Pavel Machek

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=3D90C183.5020806@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=cgl_discussion@osdl.org \
    --cc=evlog-developers@lists.sourceforge.net \
    --cc=hien@us.ibm.com \
    --cc=ipslinux@us.ibm.com \
    --cc=kenistoj@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=sullivam@us.ibm.com \
    --cc=torvalds@home.transmeta.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