mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Savochkin <saw@saw.sw.com.sg>
To: Larry Kessler <kessler@us.ibm.com>,
	linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	Jeff Garzik <jgarzik@pobox.com>,
	Rusty Russell <rusty@rustcorp.com.au>
Cc: 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: Re: README 1ST - New problem logging macros (2.5.38)
Date: Tue, 24 Sep 2002 12:36:29 +0400	[thread overview]
Message-ID: <20020924123629.C29052@castle.nmd.msu.ru> (raw)
In-Reply-To: <3D8FC601.80BAC684@us.ibm.com>; from "Larry Kessler" on Mon, Sep 23, 2002 at 06:55:13PM

My $0.02.

I understand some of the reasons why certain logging standardization
is helpful.

An example: an administrator is mainly interested in problems with the disks.
Can anyone write, say, a regular expression matching printk messages related
to disks with very low false positive and false negative levels?
I can't.

The current Larry's proposal has a disadvantage of being so big.
Anyone will have a strong internal opposition to the need to learn this
interface for just a simple logging.

Second.  One of the most important things is handling of log messages
split over multiple printk and, possibly, multiple lines.
Larry seemed to omit the most interesting place in eepro100 driver:
speedo_show_state()  :-)

Any logging infrastructure not being able to deal with places like
speedo_show_state() is only half-useful, unfortunately.
The user-level log management system should be notified that
such a dump is just a single (long) piece of information, consisting of
multiple lines.

I would think about an interface looking like:
	log_piece_start_netdev(dev);
        printk(KERN_WARNING "%s: Transmit timed out: status %4.4x "
                  " %4.4x at %d/%d command %8.8x.\n",
                   dev->name, status, inw(ioaddr + SCBCmd),
                   sp->dirty_tx, sp->cur_tx,
                   sp->tx_ring[sp->dirty_tx % TX_RING_SIZE].status);
        speedo_show_state(dev);
	log_piece_end_netdev(dev);
It is simple and not intrusive, allowing to keep most of the code as it is
(or as driver author prefers).

On top of that simple interface, you can have whatever complex infrastructure
you want, gradually bringing the code to something like
	log_piece_start_netdev(dev);
	log_severity(LOG_WARNING);
	log_netdev_attrib(LOG_NETDEV_TRANSMIT);
        printk(KERN_WARNING "%s: Transmit timed out: status %4.4x "
                  " %4.4x at %d/%d command %8.8x.\n",
                   dev->name, status, inw(ioaddr + SCBCmd),
                   sp->dirty_tx, sp->cur_tx,
                   sp->tx_ring[sp->dirty_tx % TX_RING_SIZE].status);
	log_severity(LOG_DEBUG);
        speedo_show_state(dev);
	log_piece_end_netdev(dev);
or whatever you consider nice and useful.

Best regards
		Andrey

P.S. of course, wait_for_cmd_done should have net_device as an argument,
and any logging infrastructure can't help there :-)

      parent reply	other threads:[~2002-09-24  8:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-24  1:55 [PATCH-RFC] " Larry Kessler
2002-09-24  2:40 ` Jeff Garzik
2002-09-24  5:55   ` Rusty Russell
2002-09-24  6:11     ` Jeff Garzik
2002-09-24  6:58       ` Rusty Russell
2002-09-24  5:15 ` Greg KH
2002-09-24  5:28   ` Jeff Garzik
2002-09-26 18:56   ` Larry Kessler
2002-09-26 19:38     ` Rik van Riel
2002-09-26 20:01       ` Larry Kessler
2002-09-26 18:41         ` Rob Landley
2002-09-24  5:58 ` Greg KH
2002-09-24 16:32   ` Patrick Mochel
2002-09-24  8:36 ` Andrey Savochkin [this message]

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=20020924123629.C29052@castle.nmd.msu.ru \
    --to=saw@saw.sw.com.sg \
    --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=jgarzik@pobox.com \
    --cc=kenistoj@us.ibm.com \
    --cc=kessler@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

all inboxes | Powered by JetHome®