blktrace.git
17 years agoBTT: Added user guide
Alan D. Brunelle [Mon, 5 Mar 2007 11:41:38 +0000 (12:41 +0100)]
BTT: Added user guide

o  Added in new btt/doc directory w/ Makefile.
o  Added in btt/doc/btt.tex: First pass at a User Guide for btt.
o  Fixed usage for btt (missing -A in the usage).
o  Bumped version of btt to reflect this document.
o  Cleaned up a leftover debug entry

Note: The document does /not/ have the charts intended in the final
copy yet. Hasn't even gone through a spelling & grammar & consistency
check yet.

But it's a start...

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoBTT: Clean up output in preparation for first major documentation effort.
Alan D. Brunelle [Mon, 5 Mar 2007 11:41:19 +0000 (12:41 +0100)]
BTT: Clean up output in preparation for first major documentation effort.

Took out non-useful verbose per-device and per-process data from
default output. Added in -A option to put that out.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFix a typo in unplug's due to timers.
Alan D. Brunelle [Mon, 26 Feb 2007 19:44:29 +0000 (20:44 +0100)]
Fix a typo in unplug's due to timers.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoAdd in the notion of pre-culling IOs per device until a Q is hit.
Alan D. Brunelle [Mon, 26 Feb 2007 19:44:28 +0000 (20:44 +0100)]
Add in the notion of pre-culling IOs per device until a Q is hit.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoAdded ability to add device names from a file to blktrace.
Alan D. Brunelle [Mon, 26 Feb 2007 19:44:27 +0000 (20:44 +0100)]
Added ability to add device names from a file to blktrace.

Added new argument to blktrace:

-I <devs file>

Where <devs file> has one device per line, each device is added to any
explicit -d arg, or the trailing device arguments.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoAdd Q and D histograms (based upon IO size)
Alan D. Brunelle [Mon, 26 Feb 2007 19:44:24 +0000 (20:44 +0100)]
Add Q and D histograms (based upon IO size)

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFix remap handling (again).
Alan D. Brunelle [Mon, 26 Feb 2007 19:44:23 +0000 (20:44 +0100)]
Fix remap handling (again).

I guess majors 253 and 254 are both right.
Fixed typo in bilink_first_up.

I'm seeing stuff like:

253,0    0       13    30.716486276 31815  Q   R 0 + 8 [mount]
253,0    0       14    30.718087082     3  C   R 0 + 8 [0]

Without any intervening stuff (remaps and gets and inserts and ...). So
added some support for this case.

(Note: This requires the kernel patch I submitted on 2007/02/15 to make
any sense, although this code will "work" in any event.)

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFix plug output to only display when there are plug events to show.
Alan D. Brunelle [Mon, 26 Feb 2007 19:44:21 +0000 (20:44 +0100)]
Fix plug output to only display when there are plug events to show.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoAdded return from blkrawverify to signal success or failure.
Alan D. Brunelle [Mon, 12 Feb 2007 16:24:28 +0000 (17:24 +0100)]
Added return from blkrawverify to signal success or failure.

17 years agoAdded in plug totals
Alan D. Brunelle [Mon, 12 Feb 2007 16:24:04 +0000 (17:24 +0100)]
Added in plug totals

(Also, moved plug information header so it only prints out once for all
devices, rather than per-device.)

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
17 years ago[PATCH] Add in measuring of Plug and Unplug traces.
Alan D. Brunelle [Thu, 8 Feb 2007 20:03:48 +0000 (21:03 +0100)]
[PATCH] Add in measuring of Plug and Unplug traces.

Added in the display of plug information on a per-device basis.

% Time Q Plugged: Percent of the total time during which the queue
                  was plugged

==================== Plug Information ====================

       DEV |    # Plugs # Timer Us  | % Time Q Plugged
---------- | ---------- ----------  | ----------------
 ( 68, 64) |        833(         0) |   0.36%

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoMerge branch 'master' of ssh://git.kernel.dk/data/git/blktrace
Jens Axboe [Thu, 8 Feb 2007 20:01:38 +0000 (21:01 +0100)]
Merge branch 'master' of ssh://git.kernel.dk/data/git/blktrace

17 years agoAdded overall averages for seek information
Alan D. Brunelle [Thu, 8 Feb 2007 14:59:02 +0000 (15:59 +0100)]
Added overall averages for seek information

Results in the following addition:

17 years agoAdded overall averages for merge information.
Alan D. Brunelle [Thu, 8 Feb 2007 14:58:58 +0000 (15:58 +0100)]
Added overall averages for merge information.

Results in new tail to merge information:

17 years agoFixed a problem where not all of a device structure was being cleaned out
Alan D. Brunelle [Thu, 8 Feb 2007 14:58:55 +0000 (15:58 +0100)]
Fixed a problem where not all of a device structure was being cleaned out

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoA couple of miscellaneous clean up operations.
Alan D. Brunelle [Thu, 8 Feb 2007 14:58:45 +0000 (15:58 +0100)]
A couple of miscellaneous clean up operations.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoChanged triggering on INSERT to GETRQ (temporary?)
Alan D. Brunelle [Thu, 8 Feb 2007 14:58:43 +0000 (15:58 +0100)]
Changed triggering on INSERT to GETRQ (temporary?)

This is backwards compatible with previous versions, with the one
difference being that the Q2I information may be a bit shorter.

The changes forthcoming with the explicit unplugging (2.6.20 + Jens'
unplag patches) require this. We may need to redefine and/or add a new
measurement once that settles down. When that happens, we'll most likely be
renaming things to better reflect GETRQ versus INSERT.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoAlways output seeks averages, even if we are not tracking all ios
Alan D. Brunelle [Thu, 8 Feb 2007 14:58:41 +0000 (15:58 +0100)]
Always output seeks averages, even if we are not tracking all ios

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Fix debugfs references in docs
Vasily Tarasov [Wed, 7 Feb 2007 13:39:15 +0000 (14:39 +0100)]
[PATCH] Fix debugfs references in docs

At several places in docs old mountpoint for debugfs is mentioned.
The patch just corrects these misprints.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Improve dependency checking on builds
Vasily Tarasov [Wed, 7 Feb 2007 13:02:03 +0000 (14:02 +0100)]
[PATCH] Improve dependency checking on builds

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH]: btt - major fixes and speed improvements
Alan D. Brunelle [Tue, 6 Feb 2007 19:46:16 +0000 (20:46 +0100)]
[PATCH]: btt - major fixes and speed improvements

From:  Alan D. Brunelle <Alan.Brunelle@hp.com>

Lots of changes to how we handle traces - adds robustness & quicker

This large patch contains the following changes to the trace handling
aspects of btt:

1. Use larger buffers for output options.

2. Use mmap to handle the input of trace data.

3. More precise btt statistics are output at the end.

4. Added in (under DEBUG) the display of unhandled traces. I was running
into the problem where traces were not being connected, and the rb trees
would get quite large. This would slow things down considerably. (See
below for details on why traces weren't being handled.)

5. Sprinkled some ASSERTs (under DEBUG).

6. Added a new btt-specific trace type: "links" - since 'A' (remaps)
contain two separate pieces of information, I broke them up into a link
and a remap trace. [Thus, it is easy to find either end of the remap.]

7. Added in the notion of retries of completes (and requeues). I'm finding
some discrepencies in the time stamps, in order to make btt handle these
better, I've added the notion of keeping the trace around for a bit,
to see if it gets linked up later.

8. Separated trace streams into: simple IOs, and remapped IOs.

9. Fixed up D2C averages - Q2I + I2D + D2C should equal Q2C averages.

----------------------------------------------------------------------------
I do not understand why it is so, but I am seeing two 'C' (complete)
traces for the same IO track at times. The sequence number is different
(+1 for the second one), and the time stamps are different (100's of
microseconds apart). I'm investigating this.

At least on an IA64, I am seeing time inconsistencies amongst CPUs on very
heavy loads (48 disks, 4 CPUs, almost 300 million traces). I find the 'D'
(issue) and 'C' (complete) traces coming out ahead of the associate 'I'
(insert) and 'M' (merge) traces. It would be good to get this fixed in
the kernel, but I figure it is also goodness to attempt to account for
it in post-processing as well.

----------------------------------------------------------------------------
This work was done in order to handle some of these large data sets, and
I've found that the performance is reasonable - here are some stats for
very large file (the largest of which used to take well over 12 minutes,
now it takes about 5 1/2 minutes - and a lot of that is just getting the
18GiB of data read in):

Size  Real     User     System
----- -------- -------- -------
 7GiB 123.445s  80.188s 11.392s
10GiB 179.148s 137.456s 16.680s
13GiB 237.561s 156.992s 21.968s
16GiB 283.262s 187.468s 26.748s
18GiB 336.345s 225.084s 31.200s

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Missed fixups wrt Bounce and Backmerge
Vasily Tarasov [Tue, 9 Jan 2007 15:21:16 +0000 (16:21 +0100)]
[PATCH] Missed fixups wrt Bounce and Backmerge

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Fixup filename on full file input
Ming Zhang [Tue, 2 Jan 2007 14:32:23 +0000 (15:32 +0100)]
[PATCH] Fixup filename on full file input

If the user by mistake specifies the full filename, strip that back down
to avoid missing input files.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoMerge branch 'master' of ssh://axboe@router.home.kernel.dk/data/git/blktrace
Jens Axboe [Tue, 2 Jan 2007 08:20:54 +0000 (09:20 +0100)]
Merge branch 'master' of ssh://axboe@router.home.kernel.dk/data/git/blktrace

17 years ago[PATCH] Fix double free in error path
Jens Axboe [Tue, 2 Jan 2007 08:20:49 +0000 (09:20 +0100)]
[PATCH] Fix double free in error path

Reported by zhuxudong <zhuxudong@nrchpc.ac.cn>

If we fail reading, we will free the realloc'ed pointer and jump to
the error path which will free the original pointer. Fix this by clearing
the original pointer.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Fix back descriptors
Tom Zanussi [Sat, 30 Dec 2006 19:13:40 +0000 (20:13 +0100)]
[PATCH] Fix back descriptors

The 'B' is really a bounce, not a backmerge. Fixup other merge
descriptors as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] check do_foo return value before show_stat()
Ming Zhang [Thu, 21 Dec 2006 14:56:19 +0000 (15:56 +0100)]
[PATCH] check do_foo return value before show_stat()

current code will show_stats() even when do_foo() return non zero.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] fix a divide by zero error
Ming Zhang [Thu, 21 Dec 2006 07:39:55 +0000 (08:39 +0100)]
[PATCH] fix a divide by zero error

When pdi->events and pdi->seq_skips are both 0, current code will do
0/0.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Enable use of FIFO as input
Jens Axboe [Wed, 20 Dec 2006 13:00:54 +0000 (14:00 +0100)]
[PATCH] Enable use of FIFO as input

Just reuse the stdin stuff for handling a named pipe.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoPATCH: blkparse: fix probem with empty trace files stopping the check for other files
Alan D. Brunelle [Tue, 19 Dec 2006 07:18:38 +0000 (08:18 +0100)]
PATCH: blkparse: fix probem with empty trace files stopping the check for other files

Fix problem where empty input files cause premature parsing of files.
Had a problem where CPU 0 opened a file with 0 traces, and that caused the
run to end before processing other trace files.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] README updates
Jens Axboe [Fri, 1 Dec 2006 09:57:50 +0000 (10:57 +0100)]
[PATCH] README updates

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Bump version blktrace-0.99.2
Jens Axboe [Fri, 1 Dec 2006 09:55:23 +0000 (10:55 +0100)]
[PATCH] Bump version

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] BTT patch: Fix problem with short runs
Jens Axboe [Fri, 1 Dec 2006 09:52:20 +0000 (10:52 +0100)]
[PATCH] BTT patch: Fix problem with short runs

Found a problem that if BTT took less than 1 second to execute, we'd get
Ktps of <nan> - this fixes that...

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] BTT patch: (3/3) time bounded trace analysis
Jens Axboe [Fri, 1 Dec 2006 09:51:31 +0000 (10:51 +0100)]
[PATCH] BTT patch: (3/3) time bounded trace analysis

Added in -t and -T options to allow bounding of traces analyzed. Be
forewarned: this can result in some excessive numbers of orphaned traces
(partial IO streams before the -t tiem and after the -T time won't
be analyzed).

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] BTT patch: (2/3) per-IO stream output
Jens Axboe [Fri, 1 Dec 2006 09:50:45 +0000 (10:50 +0100)]
[PATCH] BTT patch: (2/3) per-IO stream output

Two major updates:

(1) Added in some robustness - can accept out-of-order traces, and can
"orphan" unfinished IO streams.

(2) Added in ability to put IO streams to a file, sending Q-to-C traces
on a per-IO bases.

The additional robustness comes at some expense (performance), and
so I will look into that next. (Perhaps see what those Judy trees buy
us... :-) )

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] BTT patch: (1/3) 'iostat' totals
Jens Axboe [Fri, 1 Dec 2006 09:49:19 +0000 (10:49 +0100)]
[PATCH] BTT patch: (1/3) 'iostat' totals

Added in totals for IOSTAT output (per snapshot and overall totals)

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] blkparse: fix -f format override
Olaf Kirch [Fri, 1 Dec 2006 09:36:12 +0000 (10:36 +0100)]
[PATCH] blkparse: fix -f format override

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Add timestamp support
Olaf Kirch [Fri, 1 Dec 2006 09:34:11 +0000 (10:34 +0100)]
[PATCH] Add timestamp support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] btt: handle cases where we remap to a device which has no IO's (yet) in the...
Alan D. Brunelle [Mon, 13 Nov 2006 13:53:37 +0000 (14:53 +0100)]
[PATCH] btt: handle cases where we remap to a device which has no IO's (yet) in the trace.

Fix remaps when referred to device has not been added.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] blkparse: A couple of fixes: correct time output & flush files.
Alan D. Brunelle [Mon, 13 Nov 2006 13:52:53 +0000 (14:52 +0100)]
[PATCH] blkparse: A couple of fixes: correct time output & flush files.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Update doc/blktrace.tex to reflex blkparse updates.
Alan D. Brunelle [Mon, 13 Nov 2006 13:52:03 +0000 (14:52 +0100)]
[PATCH] Update doc/blktrace.tex to reflex blkparse updates.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] blkparse: Converted do_file() to use a merge sort instead of RB trees.
Alan D. Brunelle [Mon, 13 Nov 2006 13:51:35 +0000 (14:51 +0100)]
[PATCH] blkparse: Converted do_file() to use a merge sort instead of RB trees.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] blkparse: Make binary dumps buffered (reduces system calls).
Alan D. Brunelle [Mon, 13 Nov 2006 13:50:30 +0000 (14:50 +0100)]
[PATCH] blkparse: Make binary dumps buffered (reduces system calls).

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] blkparse Added --no-text-output (-O)
Alan D. Brunelle [Mon, 13 Nov 2006 13:49:48 +0000 (14:49 +0100)]
[PATCH] blkparse Added --no-text-output (-O)

Removes textual output, useful for bin only.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Ignore -o (output_name) when in server mode
Jens Axboe [Mon, 30 Oct 2006 09:42:47 +0000 (10:42 +0100)]
[PATCH] Ignore -o (output_name) when in server mode

Reported by ehrhardt@de.ibm.com.

It doesn't make a lot of sense to allow directories inside the session
private directory, and we currently do not handle multiple directories
inside the generated dir. So just ignore that option and inform the user.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Default debugfs path to /sys/kernel/debug
Jens Axboe [Mon, 30 Oct 2006 09:38:34 +0000 (10:38 +0100)]
[PATCH] Default debugfs path to /sys/kernel/debug

This seems to be where distros put it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Add btt/btt to .gitignore
Jens Axboe [Tue, 3 Oct 2006 12:51:26 +0000 (14:51 +0200)]
[PATCH] Add btt/btt to .gitignore

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Convert to using on-the-fly RB trees, no post-traversal.
Alan David Brunelle [Tue, 3 Oct 2006 12:44:18 +0000 (14:44 +0200)]
[PATCH] Convert to using on-the-fly RB trees, no post-traversal.

From: Alan D. Brunelle <Alan.Brunelle@hp.com>

- Converted to using RB trees as much as possible - significant speed
  up in general.

- Changed from constructing IO bushes to just doing things inline as we
  get the traces. Significant speed up and reduction in complexity.
  Lost ability to absolutely handle REQUEUE traces (may put out the wrong
  min/max information for certain stats).

- Added btt/dip_rb.c
- Removed btt/traverse.c btt/iofree.c btt/cylist.c
- Fixed message concerning stats & range data to include '.dat'
- Added in timing statistics (K traces per second handled)
- Changed verbose to just update once per second
- Added notions of "foreach" iterators for devices, processes, IO traces, ...
- Removed a lot of redundant code in output (using iterators instead)
- If not interested in seek information, don't calculate a lot of stuff -
  again, significant speed up.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] btt: Fixed %utilization computation: idle not being computed right.
Alan David Brunelle [Tue, 3 Oct 2006 12:42:14 +0000 (14:42 +0200)]
[PATCH] btt: Fixed %utilization computation: idle not being computed right.

Need to adjust last time device was looked at to include sparse times
when we don't have many IOs coming in.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Added in Q2C and D2C latency output option.
Alan David Brunelle [Thu, 21 Sep 2006 07:17:43 +0000 (09:17 +0200)]
[PATCH] Added in Q2C and D2C latency output option.

Also: cleaned up empty seek and latency files on exit.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
17 years ago[PATCH] Cleaned up old LVM/MD references, cleaned up btt/README.
Alan David Brunelle [Thu, 21 Sep 2006 07:17:02 +0000 (09:17 +0200)]
[PATCH] Cleaned up old LVM/MD references, cleaned up btt/README.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
17 years ago[PATCH] Added iostat-style statistics to btt
Alan David Brunelle [Thu, 21 Sep 2006 07:16:27 +0000 (09:16 +0200)]
[PATCH] Added iostat-style statistics to btt

Added iostat-style statistics: rrqm/s, wrqm/s, r/s, w/s, rsec/s, wsec/s,
rkB/s, wkB/s, avgrq-sz, avgqu-sz, await, svctm, %util.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
17 years ago[PATCH] Added '-' and '_' in dev IDs in devmap file; output dev name, not numbers
Alan David Brunelle [Thu, 21 Sep 2006 07:15:41 +0000 (09:15 +0200)]
[PATCH] Added '-' and '_' in dev IDs in devmap file; output dev name, not numbers

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
17 years ago[PATCH] btt: seek statistics fix
Alan D. Brunelle [Fri, 15 Sep 2006 00:02:08 +0000 (02:02 +0200)]
[PATCH] btt: seek statistics fix

Fixed problem with seek statistics when disk has no data.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
17 years ago[PATCH] btt: Fix invalid q2a
Alan D. Brunelle [Fri, 15 Sep 2006 00:00:54 +0000 (02:00 +0200)]
[PATCH] btt: Fix invalid q2a

Fix for invalid q2a's under certain circumstances: need to clear out
timeline information as we pop back up stack.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
17 years ago[PATCH] btt: Cleaned up patches for SEEK additions, DM, Q2A and seek fixes
Alan D. Brunelle [Thu, 14 Sep 2006 23:57:24 +0000 (01:57 +0200)]
[PATCH] btt: Cleaned up patches for SEEK additions, DM, Q2A and seek fixes

Added changes to handle DM devices:

- Used __pad field in struct blk_io_trace_remap to store from device,
  contains partition device information. Required modification in
  blkparse_fmt.c:process_default() to handle this change.

- To better handle DM devices, noted that REMAP traces can refer to other
  REMAP traces, and thus added A_A and A_Q types (much like Q_A and Q_X)
  types.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
17 years ago[PATCH] btt: seek additions
Alan D. Brunelle [Thu, 14 Sep 2006 23:53:19 +0000 (01:53 +0200)]
[PATCH] btt: seek additions

Added seek analysis to btt:

==================== Device Seek Information ====================

       DEV |          NSEEKS            MEAN          MEDIAN | MODE
---------- | --------------- --------------- --------------- | ---------------
 (  8, 16) |           15573      10297802.6               0 | 0(10710)

Shows the:
- Device (major, minor)

- Number of seeks (IOs issued to driver)

- Average (mean) of sector differences IO-to-IO

- Median seek (sector difference)

- Mode(s) - showing the mode and the number of times it occurred, thus in
  this example we see 68.8% of the "seeks" were contiguous (or overlapping).

Also added in the ability to dump all read and write seek values:

[ -s <output name> | --seeks=<output name> ]

Will create files with the name:

seek_<mjr,mnr>_[rw].dat

like:

seek_008,016_r.dat
seek_008,016_w.dat

Which contain relative sector offsets for reads and writes respectively.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
17 years ago[PATCH] Added store_barrier() for S390
Jens Axboe [Thu, 7 Sep 2006 16:36:04 +0000 (18:36 +0200)]
[PATCH] Added store_barrier() for S390

Signed-off-by: Jan Blunck <jblunck@suse.de>
17 years ago[PATCH] Fixed the Makefile in btt/
Jan Blunck [Thu, 7 Sep 2006 16:35:17 +0000 (18:35 +0200)]
[PATCH] Fixed the Makefile in btt/

Signed-off-by: Jan Blunck <jblunck@suse.de>
17 years ago[PATCH] bug in btt/output.c
Martin Peschke [Wed, 6 Sep 2006 14:54:45 +0000 (16:54 +0200)]
[PATCH] bug in btt/output.c

This patch fixes a copy'n paste bug.

17 years ago[PATCH] BTT: Improve correctness of average block size merged
Alan David Brunelle [Wed, 6 Sep 2006 13:55:28 +0000 (15:55 +0200)]
[PATCH] BTT: Improve correctness of average block size merged

Made merge average block size predicated by IOs issued.

17 years ago[PATCH] email update
Jens Axboe [Tue, 5 Sep 2006 08:47:37 +0000 (10:47 +0200)]
[PATCH] email update

17 years ago[PATCH] Ignore PC packets in btt
Alan David Brunelle [Fri, 1 Sep 2006 07:26:30 +0000 (09:26 +0200)]
[PATCH] Ignore PC packets in btt

BTT isn't really meant to trace those, and is causing problems with some
seek additions to btt I'm working on.

17 years ago[PATCH] Fixup relayfs references and kill kernel patch
Jens Axboe [Mon, 7 Aug 2006 10:25:08 +0000 (12:25 +0200)]
[PATCH] Fixup relayfs references and kill kernel patch

2.6.17 has shipped and has support for blktrace, so no need to
carry around the older 2.6.16 patch anymore.

17 years ago[PATCH] Support for logging metadata IO requests
Jens Axboe [Sun, 23 Jul 2006 00:13:20 +0000 (02:13 +0200)]
[PATCH] Support for logging metadata IO requests

17 years ago[PATCH] Support for readahead tracing
Nathan Scott [Thu, 6 Jul 2006 08:04:23 +0000 (10:04 +0200)]
[PATCH] Support for readahead tracing

These are the userspace changes to allow blktrace to distinguish
readahead from non-readahead reads.

17 years ago[PATCH] Fixup git web reference
Jens Axboe [Wed, 5 Jul 2006 11:03:13 +0000 (13:03 +0200)]
[PATCH] Fixup git web reference

18 years ago[PATCH] btt: finalize the INLINE fixup
Jens Axboe [Thu, 25 May 2006 23:23:56 +0000 (01:23 +0200)]
[PATCH] btt: finalize the INLINE fixup

18 years ago[PATCH] btt: Kill DO_INLINE and add -g
Jens Axboe [Thu, 25 May 2006 23:19:50 +0000 (01:19 +0200)]
[PATCH] btt: Kill DO_INLINE and add -g

18 years ago[PATCH] Add Alan's btt tool
Jens Axboe [Thu, 25 May 2006 23:16:17 +0000 (01:16 +0200)]
[PATCH] Add Alan's btt tool

18 years ago[PATCH] docs updates: relayfs->debugfs
Tomasz Torcz [Wed, 17 May 2006 13:13:02 +0000 (15:13 +0200)]
[PATCH] docs updates: relayfs->debugfs

documentation still mentions relayfs, but I believe debugfs is correct.
Small fix attached.

18 years ago[PATCH] blktrace.c should ignore SIGPIPE
Alex Polvi [Mon, 8 May 2006 05:15:50 +0000 (07:15 +0200)]
[PATCH] blktrace.c should ignore SIGPIPE

After sending a SIGINT to a "blktrace .. | blkparse .. " pipeline,
occasionally I would not be able to run blktrace again. On my next run
of the same pipeline I would get the following error:

cs411vm:/usr/src/bt# ./blktrace -d /dev/sdb -o - | ./blkparse -i -
BLKTRACESETUP: No such file or directory
Failed to start trace on /dev/sdb

After rebooting, I could reproduce this by starting the pipeline, and
kicking off a big write and sending a SIGINT to blktrace. The following
is what I used for a write:

while [ 1 ]
do
    dd if=/dev/zero of=/test/write bs=1M
done

It seemed like blktrace was not handling signals correctly, so I
strace'd the process to see what was happening.

Sure enough:

--- SIGINT (Interrupt) @ 0 (0) ---
ioctl(3, 0x1275, 0xb7fa6000)            = 0
sigreturn()                             = ? (mask now [])
write(1, "O\0\0\0\20\0\200\0\0\0\0\0\0\0\0\0\7taeN3\1\0\257R\260"...,
4096) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
+++ killed by SIGPIPE +++

Any idea what clean-up is not happening? I tried to figure it out, but
my only work-around was a reboot.

My patch against 2.6.17-rc3 just tells blktrace to ignore SIGPIPE.
Nothing crazy. :) blktrace already does enough error checking elsewhere
to handle a bad write.

On a completely unrelated note, the write_data function calls fwrite,
which will not return -1 on error. Instead you'll need to use ferror to
check if there was a problem. I'm not sure if this is a cause of any
bugs, but it seemed worth mentioning.

Furthermore, I updated the URLs in the documentation to point at a valid
git repo.

18 years ago[PATCH] fread/fwrite error handling
Jens Axboe [Mon, 8 May 2006 05:13:39 +0000 (07:13 +0200)]
[PATCH] fread/fwrite error handling

Need to check ferror(), not return value. Thanks to Alex Polvi.

18 years ago[PATCH] blktrace: fix sendfile problem with > buf_size xmits
Tom Zanussi [Tue, 28 Mar 2006 06:15:22 +0000 (08:15 +0200)]
[PATCH] blktrace: fix sendfile problem with > buf_size xmits

Basically, it add buf_size, buf_nr and page_size to the net header and
this info is put into each tip, for easy access in mmap_subbuf().  The
global buf_size, etc is still used by clients, since the global value is
all they need (for clients, the tip is filled in with the global values
anyway, so that mmap_subbuf() can use them, maybe the tip->buf_size
should be used everywhere instead for consistency and only use the
global values for initial args.  Also, each tip doesn't really need to
have these values, they could be stored in tip->device but I thought it
would be easier and quicker to access tip->buf_size rather than
tip->device->buf_size).  Actually, this data only needs to be sent once
per trace, but since there's no header covering the entire trace, sends
it each time.  Could be an optimization to make later...

I've tested it using sendfile over the network with different buffer
sizes, and with normal non-sendfile network and non-network tracing
straight to disk, and haven't seen any problems.  Each test generated a
little over 1Gb of trace data in a little under 2 minutes, just under 23
million events after parsing, so it looks to me like it's doing the job
at this point...

18 years ago[PATCH] Remove sysfs bits from kernel patch to match 2.6.16+
Jens Axboe [Fri, 24 Mar 2006 10:16:46 +0000 (11:16 +0100)]
[PATCH] Remove sysfs bits from kernel patch to match 2.6.16+

18 years ago[PATCH] Rename kernel patch to 2.6.16 proper.
Jens Axboe [Fri, 24 Mar 2006 10:15:03 +0000 (11:15 +0100)]
[PATCH] Rename kernel patch to 2.6.16 proper.

18 years ago[PATCH] Update references to kernel patch and its inclusion in mainline
Jens Axboe [Fri, 24 Mar 2006 10:14:37 +0000 (11:14 +0100)]
[PATCH] Update references to kernel patch and its inclusion in mainline

18 years ago[PATCH: Change remap format to have mapped-to information on the left of the ->
Alan D. Brunelle [Fri, 24 Mar 2006 10:06:59 +0000 (11:06 +0100)]
[PATCH: Change remap format to have mapped-to information on the left of the ->

Pretty self-explanatory, works fine for MD devices. Looking into DM
devices next (I think that _may_ take a kernel change).

18 years ago[PATCH] blktrace: fix get_subbuf() leak
Jens Axboe [Thu, 16 Mar 2006 08:32:55 +0000 (09:32 +0100)]
[PATCH] blktrace: fix get_subbuf() leak

18 years ago[PATCH] blktrace: sendfile() poll can use -1 timeout with the flush change
Jens Axboe [Thu, 16 Mar 2006 08:28:56 +0000 (09:28 +0100)]
[PATCH] blktrace: sendfile() poll can use -1 timeout with the flush change

18 years ago[PATCH] blktrace: only print one connection info per client
Jens Axboe [Wed, 15 Mar 2006 12:57:41 +0000 (13:57 +0100)]
[PATCH] blktrace: only print one connection info per client

18 years ago[PATCH] kernel: remember to flush relay channel on trace stop
Jens Axboe [Wed, 15 Mar 2006 12:33:36 +0000 (13:33 +0100)]
[PATCH] kernel: remember to flush relay channel on trace stop

18 years ago[PATCH] blktrace: fixes for the new net client sendfile
Jens Axboe [Wed, 15 Mar 2006 12:29:26 +0000 (13:29 +0100)]
[PATCH] blktrace: fixes for the new net client sendfile

18 years ago[PATCH] kernel: drop POLLMSG hack again
Jens Axboe [Wed, 15 Mar 2006 10:06:11 +0000 (11:06 +0100)]
[PATCH] kernel: drop POLLMSG hack again

18 years ago[PATCH] kernel: update to -rc6
Jens Axboe [Wed, 15 Mar 2006 08:04:53 +0000 (09:04 +0100)]
[PATCH] kernel: update to -rc6

18 years ago[PATCH] blktrace: remember to check flush_subbuf() return value
Jens Axboe [Tue, 14 Mar 2006 13:15:33 +0000 (14:15 +0100)]
[PATCH] blktrace: remember to check flush_subbuf() return value

Also label 'maxlen' as unused instead of using casting tricks.

18 years ago[PATCH] blktrace: per-cpu net connections
Tom Zanussi [Tue, 14 Mar 2006 08:02:07 +0000 (09:02 +0100)]
[PATCH] blktrace: per-cpu net connections

We can get reliable poll() without POLLMSG tricks, if we open a
net connection per CPU.

18 years ago[PATCH] blktrace: handle case where output directory is not set
Alan D. Brunelle [Thu, 2 Mar 2006 11:46:41 +0000 (12:46 +0100)]
[PATCH] blktrace: handle case where output directory is not set

18 years ago[PATCH] kernel: update kernel patch to include Toms read/sendfile consolidation
Jens Axboe [Mon, 27 Feb 2006 15:37:08 +0000 (16:37 +0100)]
[PATCH] kernel: update kernel patch to include Toms read/sendfile consolidation

18 years ago[PATCH] blktrace: make sendfile usage the default
Jens Axboe [Mon, 27 Feb 2006 11:15:49 +0000 (12:15 +0100)]
[PATCH] blktrace: make sendfile usage the default

18 years ago[PATCH] kernel: -rc5 update
Jens Axboe [Mon, 27 Feb 2006 11:01:47 +0000 (12:01 +0100)]
[PATCH] kernel: -rc5 update

18 years ago[PATCH] blkprase: binary dump capability + notify added
Alan D. Brunelle [Mon, 27 Feb 2006 07:10:32 +0000 (08:10 +0100)]
[PATCH] blkprase: binary dump capability + notify added

Here is a proposed patch which would allow blkparse to dump its output
to a binary file (in addition to the ascii output). It adds a new '-d
<file>' parameter.

The purpose of this would be to allow for the easier handling of the
collected data by analysis tools. [Rather than having to parse the
textual output from blkparse, or duplicate the collation efforts of
blkparse itself.]

18 years ago[PATCH] kernel: relay files are now in debugfs
Jens Axboe [Mon, 27 Feb 2006 07:06:17 +0000 (08:06 +0100)]
[PATCH] kernel: relay files are now in debugfs

18 years ago[PATCH] blktrace: relay files are now in debugfs
Jens Axboe [Mon, 27 Feb 2006 07:05:22 +0000 (08:05 +0100)]
[PATCH] blktrace: relay files are now in debugfs

18 years ago[PATCH] Mark as 0.99.1
Jens Axboe [Thu, 23 Feb 2006 14:16:18 +0000 (15:16 +0100)]
[PATCH] Mark as 0.99.1

18 years ago[PATCH] blktrace: add __for_each_foo() for nc's, and fix crash on bad realloc blktrace-0.99.1
Jens Axboe [Thu, 23 Feb 2006 14:14:29 +0000 (15:14 +0100)]
[PATCH] blktrace: add __for_each_foo() for nc's, and fix crash on bad realloc

18 years ago[PATCH] blktrace: fix possible crash on exit without ever opening an ofile
Jens Axboe [Thu, 23 Feb 2006 13:51:17 +0000 (14:51 +0100)]
[PATCH] blktrace: fix possible crash on exit without ever opening an ofile

18 years ago[PATCH] blktrace: support multiple network connections
Jens Axboe [Thu, 23 Feb 2006 12:29:06 +0000 (13:29 +0100)]
[PATCH] blktrace: support multiple network connections

18 years ago[PATCH] blktrace: make sure net traces for multiple devices end up in same dir
Jens Axboe [Thu, 23 Feb 2006 10:49:38 +0000 (11:49 +0100)]
[PATCH] blktrace: make sure net traces for multiple devices end up in same dir

18 years ago[PATCH] blktrace: make net server dropped count be per-device
Jens Axboe [Thu, 23 Feb 2006 09:53:25 +0000 (10:53 +0100)]
[PATCH] blktrace: make net server dropped count be per-device

Require client to send a close event for each device.