linux/include
Tom Zanussi e82894f84d [PATCH] relayfs
Here's the latest version of relayfs, against linux-2.6.11-mm2.  I'm hoping
you'll consider putting this version back into your tree - the previous
rounds of comment seem to have shaken out all the API issues and the number
of comments on the code itself have also steadily dwindled.

This patch is essentially the same as the relayfs redux part 5 patch, with
some minor changes based on reviewer comments.  Thanks again to Pekka
Enberg for those.  The patch size without documentation is now a little
smaller at just over 40k.  Here's a detailed list of the changes:

- removed the attribute_flags in relay open and changed it to a
  boolean specifying either overwrite or no-overwrite mode, and removed
  everything referencing the attribute flags.
- added a check for NULL names in relayfs_create_entry()
- got rid of the unnecessary multiple labels in relay_create_buf()
- some minor simplification of relay_alloc_buf() which got rid of a
  couple params
- updated the Documentation

In addition, this version (through code contained in the relay-apps tarball
linked to below, not as part of the relayfs patch) tries to make it as easy
as possible to create the cooperating kernel/user pieces of a typical and
common type of logging application, one where kernel logging is kicked off
when a user space data collection app starts and stops when the collection
app exits, with the data being automatically logged to disk in between.  To
create this type of application, you basically just include a header file
(relay-app.h, included in the relay-apps tarball) in your kernel module,
define a couple of callbacks and call an initialization function, and on
the user side call a single function that sets up and continuously monitors
the buffers, and writes data to files as it becomes available.  Channels
are created when the collection app is started and destroyed when it exits,
not when the kernel module is inserted, so different channel buffer sizes
can be specified for each separate run via command-line options.  See the
README in the relay-apps tarball for details.

Also included in the relay-apps tarball are a couple examples
demonstrating how you can use this to create quick and dirty kernel
logging/debugging applications.  They are:

- tprintk, short for 'tee printk', which temporarily puts a kprobe on
  printk() and writes a duplicate stream of printk output to a relayfs
  channel.  This could be used anywhere there's printk() debugging code
  in the kernel which you'd like to exercise, but would rather not have
  your system logs cluttered with debugging junk.  You'd probably want
  to kill klogd while you do this, otherwise there wouldn't be much
  point (since putting a kprobe on printk() doesn't change the output
  of printk()).  I've used this method to temporarily divert the packet
  logging output of the iptables LOG target from the system logs to
  relayfs files instead, for instance.

- klog, which just provides a printk-like formatted logging function
  on top of relayfs.  Again, you can use this to keep stuff out of your
  system logs if used in place of printk.

The example applications can be found here:

http://prdownloads.sourceforge.net/dprobes/relay-apps.tar.gz?download

From: Christoph Hellwig <hch@lst.de>

  avoid lookup_hash usage in relayfs

Signed-off-by: Tom Zanussi <zanussi@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:18 -07:00
..
acpi /home/lenb/src/to-linus branch 'acpi-2.6.12' 2005-07-29 23:31:17 -04:00
asm-alpha [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-arm [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-arm26 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-cris [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-frv [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-generic Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild 2005-09-06 00:35:51 -07:00
asm-h8300 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-i386 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-ia64 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-m32r [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-m68k [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-m68knommu [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-mips [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-parisc [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-powerpc [PATCH] ppc/ppc64: Merge more include files 2005-09-06 16:07:53 +10:00
asm-ppc [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-ppc64 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-s390 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-sh [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-sh64 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-sparc [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-sparc64 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-um [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-v850 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-x86_64 [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
asm-xtensa [PATCH] xtensa: delete accidental file 2005-09-05 00:06:25 -07:00
linux [PATCH] relayfs 2005-09-07 16:57:18 -07:00
math-emu
media [PATCH] I2C: Kill i2c_algorithm.id (6/7) 2005-09-05 09:14:32 -07:00
mtd [MTD] NAND: Honour autoplacement schemes supplied by the caller 2005-05-23 13:20:45 +02:00
net [NET]: Do not protect sysctl_optmem_max with CONFIG_SYSCTL 2005-09-05 18:14:11 -07:00
pcmcia [PATCH] pcmcia: fix pcmcia-cs compilation 2005-07-12 16:00:59 -07:00
rdma [PATCH] IB: move include files to include/rdma 2005-08-26 20:37:38 -07:00
rxrpc
scsi [SCSI] fix target scanning oops with fc transport class 2005-08-08 17:14:55 -05:00
sound [ALSA] version 1.0.10rc1 2005-08-30 08:48:35 +02:00
video [PATCH] DEC PMAGB B framebuffer update 2005-09-05 00:06:03 -07:00