Whamcloud - gitweb
b=3668
authorphil <phil>
Wed, 30 Jun 2004 03:49:03 +0000 (03:49 +0000)
committerphil <phil>
Wed, 30 Jun 2004 03:49:03 +0000 (03:49 +0000)
commitaa25e046a6e01d0384a3011cfe8486ead648b7ba
tree1bb39c9480d46803e9e1de1f678dfc013c7fbcdd
parent59fad1cc421083a79c033e729f5a6a4d933a5739
b=3668
r=adilger
A new lighter-weight CDEBUG infrastructure based on Zach's tracefile
patches:

- Each CPU gets its own list of pages, so a line can be inserted
  without locking
- we do less printf'ing in the kernel, and send a packed structure of
  integers down for the leading bits of each line
- lctl unpacks them, sorts the results (each page is sorted, but not
  globally), and prints
- we are no longer limited to 5MB, because we don't vmalloc a single
  huge buffer (/proc/sys/portals/debug_size, in pages)
- result: on a single system with client, MDS, OST, running iozone
  with -1 debug is no longer CPU-bound

There is also a new debug daemon, naturally, which works in basically
the same way as the old one. There are a couple of points, though:

- you need to use lctl on the results, to unpack the struct and
  sort. It does not sort the whole n gigabytes as one piece, but it
  does sort each "chunk" that was dumped at a time. Those chunks are
  guaranteed to be chronologically ordered.
- lctl debug_daemon [start|stop] are implemented in terms of /proc
- you can "debug_daemon start <file>", or echo to proc, multiple
  times. If it's already running, it will atomically change to a new
  file, so that you can build a set of rotating debug daemon logs,
  without filling up your disk, and without losing any messages during
  the transition from one file to another.
lnet/libcfs/proc.c
lustre/portals/libcfs/proc.c