public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: bert hubert <bert.hubert@netherlabs.nl>
Cc: relayfs-devel@lists.sourceforge.net, richardj_moore@uk.ibm.com,
	varap@us.ibm.com, karim@opersys.com,
	linux-kernel@vger.kernel.org, Tom Zanussi <zanussi@us.ibm.com>
Subject: Re: [PATCH] Re: relayfs documentation sucks?
Date: Mon, 18 Jul 2005 09:27:54 -0400	[thread overview]
Message-ID: <1121693274.12862.15.camel@localhost.localdomain> (raw)
In-Reply-To: <20050717194558.GC27353@outpost.ds9a.nl>

On Sun, 2005-07-17 at 21:45 +0200, bert hubert wrote:
> On Sun, Jul 17, 2005 at 10:43:40AM -0500, Tom Zanussi wrote:
> 
> > It is racey - in this mode, there's nothing to keep the kernel from
> > writing as much as it wants before the user side has a chance to read
> > any of it.  The only way this can be used safely is to make sure the
> > kernel side isn't writing anything when the client is reading.  This
> > would be typical of a flight-recording usage i.e. kernel writes a
> > bunch of data continuously, then stops and allows the client to read
> > whatever's in there.
> 
> Or by numbering entries written out, when in flight-recording mode you
> wouldn't want to block the kernel.

Exactly!  I've written a logging device to record data in the kernel
that a printk can't help with.  I've used this in debugging inturrupts,
the scheduler, and high speed network packets. Where a printk to a
serial would just slow things down, and going to the network is too
expensive, and complex if you happen to be debugging the network. This
tool is called logdev (http://www.kihontech.com/logdev) and uses a ring
buffer that is like the relayfs overwrite mode. It can do printk like
records and when something goes wrong, I dump the buffer to the serial.
Or I have a user space program reading it from a device. I don't care
about anything that happened earlier, I want to only know what happened
up to the point I dumped the buffer.  Lately, I've been usuing this with
Ingo's RT patch, and when the system locks up, I dump the buffer, and it
shows quite nicely where the lockup occurred, and why.

With Tom's help, I also have a version that uses relayfs as a backend in
overwrite mode.  It's still a work in progress (so no web site yet!)
since there's some issues of using a singe buffer for multiple CPUs.
This helps in debugging race conditions since you need to see how events
interleave.

> 
> >  > In fact, it appears this might even happen in non-overwrite mode.
> > 
> > It shouldn't ever be able to happen in non-overwrite mode - if it
> > did, it would be a bug.  Can you be more specific as to how you see
> > this happening in this mode?
> 
> Yeah - you're right. The misunderstanding is because in both cases
> (overwrite and non-overwrite) data is lost, except that in one case you lose
> old data, and in the other new data.
> 
> It might be a good idea to document this as well.
> 
> Btw, I've already uncovered interesting things using relayfs, but I still
> don't see the case for having it merged :-)

The reason I would like to see this merged, so kernel hackers don't need
to constantly write there own logging buffers everytime you need to
debug a complex area of the kernel.

-- Steve



  parent reply	other threads:[~2005-07-18 13:28 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12  1:10 Merging relayfs? Tom Zanussi
2005-07-12  1:45 ` Andrew Morton
2005-07-12  2:17   ` Dave Airlie
2005-07-12  2:22   ` Tom Zanussi
2005-07-12  9:12     ` Baruch Even
2005-07-12  2:25 ` Christoph Hellwig
2005-07-12  2:34   ` Andrew Morton
2005-07-12  2:59     ` Karim Yaghmour
2005-07-14 13:26     ` Roman Zippel
2005-07-14 15:01       ` Tom Zanussi
2005-07-17 14:04         ` Roman Zippel
2005-07-17 15:52           ` Tom Zanussi
2005-07-18  5:17             ` Hareesh Nagarajan
2005-07-18 14:31               ` Tom Zanussi
2005-07-18 13:44             ` Steven Rostedt
2005-07-18 14:16               ` Roman Zippel
2005-07-18 14:32                 ` Karim Yaghmour
2005-07-18 15:20                   ` Roman Zippel
2005-07-18 15:58                     ` Tom Zanussi
2005-07-22 20:43                       ` Tom Zanussi
2005-07-22 23:19                         ` Karim Yaghmour
2005-07-23  2:31                           ` Tom Zanussi
2005-07-26  2:35                             ` Karim Yaghmour
2005-07-22 20:43                       ` Tom Zanussi
2005-07-18 14:36                 ` Steven Rostedt
2005-07-18 15:06                   ` Roman Zippel
2005-07-18 14:41               ` Tom Zanussi
2005-07-18  8:40         ` Richard J Moore
2005-07-12 13:03   ` Steven Rostedt
2005-07-12  3:05 ` Greg KH
2005-07-12  3:03   ` Karim Yaghmour
2005-07-12  3:24     ` Greg KH
2005-07-12  3:52       ` Karim Yaghmour
2005-07-12  4:30         ` Greg KH
2005-07-12  4:40           ` Karim Yaghmour
2005-07-12  5:23             ` Greg KH
2005-07-12 14:36               ` Steve Rotolo
2005-07-12  3:55       ` Tom Zanussi
2005-07-12  4:27         ` Greg KH
2005-07-12 14:01 ` Tomasz Kłoczko
2005-07-12 14:21   ` Baruch Even
2005-07-12 15:30     ` Tomasz Kłoczko
2005-07-12 15:16   ` Tom Zanussi
2005-07-12 15:44     ` Tomasz Kłoczko
2005-07-12 16:27       ` Tom Zanussi
2005-07-12 17:01         ` Tomasz Kłoczko
2005-07-12 17:23           ` Tom Zanussi
     [not found]             ` <Pine.BSO.4.62.0507121935500.6919@rudy.mif.pg.gda.pl>
     [not found]               ` <17108.1906.628755.613285@tut.ibm.com>
     [not found]                 ` <Pine.BSO.4.62.0507122026520.6919@rudy.mif.pg.gda.pl>
     [not found]                   ` <17108.5721.202275.377020@tut.ibm.com>
2005-07-12 19:29                     ` Tomasz Kłoczko
2005-07-12 20:44                       ` Vara Prasad
2005-07-12 21:02               ` Vara Prasad
2005-07-13 12:40                 ` Tomasz Kłoczko
2005-07-13 15:04                   ` Vara Prasad
2005-07-13 16:22                     ` Tomasz Kłoczko
2005-07-13  4:29           ` Vara Prasad
2005-07-13 13:47             ` Tomasz Kłoczko
2005-07-13 15:55               ` Karim Yaghmour
2005-07-13 15:56               ` Vara Prasad
2005-07-13 16:50                 ` Tomasz Kłoczko
2005-07-12 14:58 ` Jason Baron
2005-07-12 15:26   ` Tom Zanussi
2005-07-12 16:00     ` Steven Rostedt
2005-07-12 15:53   ` Steven Rostedt
2005-07-12 16:08     ` Tom Zanussi
2005-07-12 16:23       ` Steven Rostedt
2005-07-12 16:36         ` Tom Zanussi
2005-07-12 16:49           ` Steven Rostedt
2005-07-12 17:01             ` Tom Zanussi
2005-07-12 21:38               ` Tom Zanussi
2005-07-12 23:40                 ` Steven Rostedt
2005-07-12 23:55                   ` Andrew Morton
2005-07-13  0:08                     ` Steven Rostedt
2005-07-16 21:07 ` relayfs documentation sucks? bert hubert
2005-07-16 23:13   ` Tom Zanussi
2005-07-17  9:01     ` [PATCH] " bert hubert
2005-07-17 15:43       ` Tom Zanussi
2005-07-17 19:45         ` bert hubert
2005-07-17 20:47           ` Tom Zanussi
2005-07-18 13:27           ` Steven Rostedt [this message]
2005-07-20 21:27             ` Paul Jackson
2005-07-20 21:45               ` bert hubert
2005-07-21  0:31                 ` Paul Jackson
2005-07-22 20:01                 ` Paul Jackson
2005-07-22 20:33                   ` relayfs as infrastructure, ltt, systemtap, diskstat bert hubert
2005-07-23 18:53                     ` Christoph Hellwig
2005-07-23 18:53                   ` [PATCH] Re: relayfs documentation sucks? Christoph Hellwig
2005-07-25 23:47                     ` Karim Yaghmour
2005-07-26  5:15                       ` bert hubert

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=1121693274.12862.15.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=bert.hubert@netherlabs.nl \
    --cc=karim@opersys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=relayfs-devel@lists.sourceforge.net \
    --cc=richardj_moore@uk.ibm.com \
    --cc=varap@us.ibm.com \
    --cc=zanussi@us.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