blktrace.git
16 years agoUNPLUG does the timing stuff, UNPLUG TIMEOUT only does timeout
Alan D. Brunelle [Thu, 31 Jan 2008 22:10:52 +0000 (17:10 -0500)]
UNPLUG does the timing stuff, UNPLUG TIMEOUT only does timeout

Each UNPLUG TIMEOUT should be followed by an UNPLUG, so we were getting
double information on time outs.

16 years agoFixed excess bucket information for unplug histograms.
Alan D. Brunelle [Thu, 31 Jan 2008 18:02:24 +0000 (13:02 -0500)]
Fixed excess bucket information for unplug histograms.

16 years agoFix Q counts during requeue and merges.
Dave Boutcher [Thu, 3 Jan 2008 15:21:32 +0000 (10:21 -0500)]
Fix Q counts during requeue and merges.

It looks to me like btt doesn't correctly keep track
of the number of requests currently in the queue for
a device.  n_act_q gets incremented in trace_queue
and decremented in trace_issue, but I think it also
needs to get updated in trace_merge and trace_requeue.

The one thing I'm not sure about is whether we want
r_iop->dip->n_qs++ in the new handle_requeue routine.

The following patch makes the "active requests at Q"
count a little more sane for me.  This is against
git as of yesterday.
Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
16 years agoSeparated out g/i/m trace handling.
Alan D. Brunelle [Mon, 10 Dec 2007 18:41:37 +0000 (13:41 -0500)]
Separated out g/i/m trace handling.

Also separated out DM-device calculations.

16 years agobtreplay/btrecord man pages
Bas Zoetekouw [Sun, 9 Dec 2007 18:43:16 +0000 (19:43 +0100)]
btreplay/btrecord man pages

Attached are manpages for the btreplay and btrecord utilities for
inclusion in the git repo.  I'm about to upload anew version to Debian
which will include these manpages, too.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoMerge branch 'master' into add-q2d
Alan D. Brunelle [Thu, 6 Dec 2007 14:00:47 +0000 (09:00 -0500)]
Merge branch 'master' into add-q2d

16 years agoRemove strange make dependency
Joshua Root [Thu, 6 Dec 2007 08:13:48 +0000 (09:13 +0100)]
Remove strange make dependency

Listing "-lpthread" as a dependency in a make rule doesn't make much sense.

Signed-off-by: Joshua Root <jmr@gelato.unsw.edu.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoAdded in Q2D histograms (requires -A)
Alan D. Brunelle [Wed, 5 Dec 2007 23:08:10 +0000 (18:08 -0500)]
Added in Q2D histograms (requires -A)

As an example, the buckets are in seconds:

==================== Q2D Histogram ====================

       DEV | <.005 <.010 <.025 <.050 <.075 <.100 <.250 <.500 < 1.0 >=1.0
 --------- | ===== ===== ===== ===== ===== ===== ===== ===== ===== =====
 ( 66, 80) |  61.2   7.9  12.1   7.9   3.0   1.4   1.5   0.2   0.0   4.6
 ( 65,192) |  42.3   5.0   8.7  30.0   8.9   3.0   1.8   0.1   0.0   0.1
 ( 65,128) |  34.3   5.3   8.9  32.0   9.7   3.7   5.3   0.6   0.0   0.1
 ( 66,  0) |  45.5   9.9  19.0  14.8   4.6   1.2   0.3   0.0   0.0   4.7
 ( 65, 48) |  50.2   4.6   7.2  27.6   6.9   2.1   1.1   0.0   0.0   0.1
 ( 66, 32) |  66.4   6.7  10.9   7.0   2.5   1.1   0.6   0.1   0.0   4.7
 ( 65,224) |  33.9   9.6  20.6  17.8   7.3   3.1   3.3   0.5   0.1   3.8
 ( 65,112) |  35.3   5.2   8.7  30.8   9.3   3.9   5.6   0.9   0.1   0.1
 ( 65, 80) |  57.9   4.6   6.6  25.2   4.7   0.8   0.2   0.0   0.0   0.1
 ( 65,240) |  62.6   8.1  13.1   7.7   2.3   0.6   0.5   0.0   0.0   5.1
 ( 66,112) |  59.6   8.0  13.1   8.6   3.3   1.5   1.2   0.1   0.0   4.6
 ( 65,144) |  45.8   5.1   7.9  29.3   7.8   2.5   1.4   0.0   0.0   0.1
 ( 65,176) |  43.2   5.2   8.9  30.8   8.3   2.5   1.0   0.0   0.0   0.1
 ( 66, 16) |  77.0   5.4   7.4   3.3   0.7   0.3   0.7   0.1   0.0   5.0
 ( 65, 96) |  54.6   4.9   7.2  26.6   5.3   1.0   0.2   0.0   0.0   0.1
 ( 66, 48) |  71.0   6.8  10.5   5.4   0.9   0.1   0.1   0.0   0.0   5.2
 ( 65,208) |  43.5   5.6   8.5  31.0   7.2   2.2   1.9   0.0   0.0   0.1
 ( 66,128) |  69.5   7.0  10.3   6.2   1.5   0.3   0.1   0.0   0.0   5.0
 ( 65, 64) |  59.9   4.2   6.0  24.6   4.2   0.8   0.1   0.0   0.0   0.1
 ( 66, 64) |  62.6   8.1  12.7   7.9   2.4   0.6   0.1   0.0   0.0   5.4
========== | ===== ===== ===== ===== ===== ===== ===== ===== ===== =====
       AVG |  52.9   6.2  10.0  20.1   5.3   1.7   1.4   0.2   0.0   2.1

16 years agomemset() must be done after NULL check
Jens Axboe [Wed, 14 Nov 2007 09:45:23 +0000 (10:45 +0100)]
memset() must be done after NULL check

Pointed out by Jan Blunck <jblunck@suse.de>

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoAdded active requests at Q information.
Alan D. Brunelle [Tue, 13 Nov 2007 22:16:38 +0000 (17:16 -0500)]
Added active requests at Q information.

An important consideration when analyzing block IO schedulers is to know
how many requests the scheduler has to work with. The metric provided
in this section details how many requests (on average) were being held
by the IO scheduler when an incoming IO request was being handled. To
determine this, btt keeps track of how many Q requests came in, and
subtacts requests that have been issued (D).

Sample:

==================== Active Requests At Q Information ====================

       DEV |  Avg Reqs @ Q
---------- | -------------
 ( 65, 80) |          12.0
 ( 65,240) |          16.9
 ( 65,112) |          13.3
 ( 66, 64) |          32.8
 ( 66, 80) |          21.5
 ( 65, 96) |           8.6
 ( 66, 16) |          16.2
 ( 65, 64) |          20.4
 ( 66, 96) |          18.3
 ( 65,176) |          17.4
 ( 66, 32) |          13.6
 ( 65,144) |          13.4
 ( 66,  0) |          21.4
 ( 65,192) |          19.4
 ( 66,128) |          18.4
 ( 66,144) |          16.2
 ( 65,128) |           8.0
 ( 66,112) |          44.2
---------- | -------------
   Overall | Avgs Reqs @ Q
   Average |          17.4

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
16 years agoFixed REMAP to update Q2A & fixed #Q calculations
Alan D. Brunelle [Thu, 8 Nov 2007 13:34:44 +0000 (08:34 -0500)]
Fixed REMAP to update Q2A & fixed #Q calculations

16 years agoblktrace segfault
Aneesh Kumar K.V [Mon, 29 Oct 2007 19:47:28 +0000 (20:47 +0100)]
blktrace segfault

Core was generated by `blktrace -d /dev/hdc'.
Program terminated with signal 11, Segmentation fault.
#0  0xb7e4cdec in ?? ()
(gdb) where
#0  0xb7e4cdec in ?? ()
#1  0xb7dbf000 in ?? ()
#2  0x00021000 in ?? ()
#3  0xb7dee6e8 in ?? ()
#4  0x0804ecf0 in ?? ()
#5  0x00000001 in ?? ()
#6  0x6c616367 in ?? ()
#7  0xbfee3f68 in ?? ()
#8  0xb7f51300 in ?? ()
#9  0x00000168 in ?? ()
#10 0x0804ecf0 in ?? ()
#11 0x00000001 in ?? ()
#12 0xbfee3f88 in ?? ()
#13 0xbfee3f68 in ?? ()
#14 0x080499dc in close_thread (tip=0xb7f1eff4) at blktrace.c:637
Backtrace stopped: frame did not save the PC
(gdb)

the below diff fix the same.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoAdded O_NOATIME to replay file
Alan D. Brunelle [Wed, 10 Oct 2007 17:25:20 +0000 (13:25 -0400)]
Added O_NOATIME to replay file

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
16 years agoFix segfault in replay_sub when verbose is 1
Joshua Root [Wed, 10 Oct 2007 11:17:56 +0000 (07:17 -0400)]
Fix segfault in replay_sub when verbose is 1

tip->vfp is only initialised when verbose > 1, so we must only use it
under the same circumstance.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
16 years agoMerge branch 'master' of git://brick.kernel.dk/data/git/blktrace
Alan D. Brunelle [Fri, 5 Oct 2007 22:30:27 +0000 (18:30 -0400)]
Merge branch 'master' of git://brick.kernel.dk/data/git/blktrace

16 years agoConverted fatal to an inline function
Alan D. Brunelle [Fri, 5 Oct 2007 20:32:46 +0000 (16:32 -0400)]
Converted fatal to an inline function

Removes warning from gcc-4.2.1

16 years agoConverted fatal from macro to inline
Alan D. Brunelle [Wed, 3 Oct 2007 14:49:42 +0000 (10:49 -0400)]
Converted fatal from macro to inline

Hopefully this will fix a gcc-4.2.1 warning.

Signed-off-by: Alan D. Brunelle <adb@korik.(none)>
16 years agoAdd btrecord/btreplay capability
Alan D. Brunelle [Tue, 2 Oct 2007 16:35:07 +0000 (12:35 -0400)]
Add btrecord/btreplay capability

These facilities allow one to attempt to replay a stream of IOs
captured with blktrace. The general workflow is:

1. Initiate blktrace to capture traces
2. Do whatever to generate initial IO stream...
3. Stop blktrace
4. Run btrecord to convert traces into IO records
5. Run btreplay to replay IOs

The IO stream characteristics during replay will try to respect the
following characteristics of the original IO stream:

1. The IOs will target the same device(s) as originally seen. [One can
   alter this behavior by specifyin the -M option to btreplay, which
   allows one to remap IOs slated to one set of devices to a specified
   other set of devices.]

2. IO direction: the IOs will follow the same read/write
   (from-device/to-device) characteristics of the originating flow. [Note:
   By default replay will /not/ do writes, one must specify the -W option
   to do this. THis is a meager attempt to stop someone from shooting
   themselves in the foot (with a very large-caliber weapon).]

3. IO offset & size are maintained.

4. CPU: IOs are submitted on the originating CPU whenever possible. [Note:
   Since we are using asynchronous IO, IOs may be routed to another CPU
   prior to being processed by the block IO layer.]

In order to try and replicate inter-IO timing as much as possible,
btrecord will combine IOs "close in time" into one set, or bunch, of
IOs. Then btreplay will replay all the IOs in one go (via asynchronous
direct IO - io_submit). The size of the bunches are configurable via
the -m flag to btrecord (which specifies the a time-based bunch size)
and/or the -M flag (which specifies the maximum amount of IOs to put
into a bunch). At the low-end, specifying '-M 1' instructs btrecord to
act like fio - replay each IO as an individual unit.

Besides the potential to remap devices (utilizing the -M option to replay,
as noted above), one can also limit the number of CPUs on the replay
machine - so if you have fewer CPUs on the replay machine you specify
the -c option to btreplay.

Lastly, one can specify the -N option to btreplay to instruct it to ignore
inter-IO (inter-bunch of IOs) timings. Thus, this instructs btreplay
to replay the bunches as fast as possible, ignoring the original delays
between original IOs.

The utilities include a write-up in the docs directory.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoAdded list_splice to btt/list.h
Alan D. Brunelle [Tue, 2 Oct 2007 16:08:34 +0000 (12:08 -0400)]
Added list_splice to btt/list.h

list_splice is needed for the addition of btrecord/btreplay.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agobtt manpages
Bas Zoetekouw [Mon, 1 Oct 2007 06:33:37 +0000 (08:33 +0200)]
btt manpages

Attached is an update for the btt.1 man page that should bring the man
page in sync with the TeX documentation.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoFix compilation on m68k
Bas Zoetekouw [Mon, 1 Oct 2007 06:32:29 +0000 (08:32 +0200)]
Fix compilation on m68k

Missing defines for store_barrier()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoMajor revamping (ver 2.0)
Alan D. Brunelle [Mon, 10 Sep 2007 16:37:49 +0000 (18:37 +0200)]
Major revamping (ver 2.0)

After a lot of fighting with maintaining a tree-styled design (each trace
having it's own node), it was just getting too cumbersome to work in all
circumstances. Taking a clue from blkparse itself, I decided to just keep
track of IOs at queue time, and updating fields based upon later traces.

The attached (large) patch works much faster, handles larger test cases
with less failures, and is managing some pretty large jobs I'm working on
(large Oracle-based DB analysis - 32-way box w/ lots of storage).

I've also added a Q2Q seek distance feature - it's come in handy when
comparing results of IO scheduler choice: We can see what the incoming IO
seek distances are (at queue time), and then see how the scheduler itself
manages things (via merges & sorting) by looking at D2D seek distances
generated.

As noted in the subject, I arbitrarily bumped this to version 2.00 as the
innards are so different. The documentation (btt/doc/btt.tex) has been
updated to reflect some minor output changes. I also fixed a bug dealing
with process name notification: there was a problem that if a new PID came
up with a name that was previously seen, btt wouldn't keep track of it
right. [When running with Oracle, a lot of processes have the same name but
different PIDs of course.]

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblktrace 0.99.3 blktrace-0.99.3
Jens Axboe [Tue, 28 Aug 2007 13:03:59 +0000 (15:03 +0200)]
blktrace 0.99.3

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblktrace man page: mention buffer size / number of buffers defaults.
Jens Axboe [Tue, 28 Aug 2007 13:00:33 +0000 (15:00 +0200)]
blktrace man page: mention buffer size / number of buffers defaults.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblktrace: fix indent typo
Valerie Henson [Mon, 27 Aug 2007 19:50:57 +0000 (21:50 +0200)]
blktrace: fix indent typo

Fix minor indentation typo in blktrace man page.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoMakefile fixes
Jan Blunck [Sun, 26 Aug 2007 17:35:31 +0000 (19:35 +0200)]
Makefile fixes

Here is a patch with small fixes to the Makefiles which I use in the
openSUSE blktrace package.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoDisregard generated doc files in .gitignore
Jens Axboe [Mon, 20 Aug 2007 13:31:50 +0000 (15:31 +0200)]
Disregard generated doc files in .gitignore

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoFix Makefile buglets
Vincent Legoll [Mon, 30 Jul 2007 13:23:43 +0000 (15:23 +0200)]
Fix Makefile buglets

- make install without having called make before
- create man directories if non pre-existent

Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoAdd man pages
Jens Axboe [Tue, 24 Jul 2007 14:02:28 +0000 (16:02 +0200)]
Add man pages

Thanks to Bas Zoetekouw <bas@debian.org> for providing these! And
shame on me for forgetting to add them to the git repo.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agogit:// url location update
Jens Axboe [Wed, 18 Jul 2007 11:51:56 +0000 (13:51 +0200)]
git:// url location update

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoUpdate email address
Jens Axboe [Wed, 13 Jun 2007 14:16:00 +0000 (16:16 +0200)]
Update email address

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoMake the %C format specified explanation more clear
Jens Axboe [Thu, 31 May 2007 14:27:37 +0000 (16:27 +0200)]
Make the %C format specified explanation more clear

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoSmall format update for empty requests
Jens Axboe [Wed, 30 May 2007 11:02:01 +0000 (13:02 +0200)]
Small format update for empty requests

The kernel can use empty bio's or requests for signalling purposes
(such as sending a barrier down with no data attached), update the
format to output more appropriately for those.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoAccount size of merges
Jens Axboe [Mon, 21 May 2007 08:25:38 +0000 (10:25 +0200)]
Account size of merges

Just like we do for queues/dispatches/completions etc.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFix queued vs dispatch numbers
Jens Axboe [Mon, 21 May 2007 08:16:59 +0000 (10:16 +0200)]
Fix queued vs dispatch numbers

A merge trace includes a queue trace. blkparse accounted both
of them, resulting in the queued transfer number being a lot
larger than it should be. Fix that by not accounting bytes
in the merge handling.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFix crash with '-' stdin input
Jens Axboe [Wed, 16 May 2007 09:02:18 +0000 (11:02 +0200)]
Fix crash with '-' stdin input

Need to use argv[optind], not optarg.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agobtrace: Add in -r support for btrace
Alan D. Brunelle [Fri, 11 May 2007 13:43:06 +0000 (15:43 +0200)]
btrace: Add in -r support for btrace

Using Ubuntu, debugfs is mounted on /debug instead of /sys/kernel/debug.
[Perhaps, we should put in blktrace a search through "common" areas
where debug could be mounted, and or do a simple parsing of the output
from a 'mount' command to /find/ the directory.]

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFix unplug histogram placement.
Alan D. Brunelle [Wed, 18 Apr 2007 12:53:52 +0000 (14:53 +0200)]
Fix unplug histogram placement.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoAdd in unplug IO count histogram
Alan D. Brunelle [Mon, 16 Apr 2007 17:17:12 +0000 (19:17 +0200)]
Add in unplug IO count histogram

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoCleaned out the btt/README file.
Alan D. Brunelle [Mon, 16 Apr 2007 17:16:55 +0000 (19:16 +0200)]
Cleaned out the btt/README file.

The documentation under btt/doc/btt.tex is current, while this is woefully
out of date.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoCombine all outstanding patches into one /big patch/
Alan D. Brunelle [Sat, 14 Apr 2007 06:05:06 +0000 (08:05 +0200)]
Combine all outstanding patches into one /big patch/

o  Added seek absolute option -- allows one to specify whether they want
   seek distances to be calculated based upon nearness to previous IO or
   from start to start.

o  Added block number dumping

o  Updated btt documentation for above.

o  Significant clean up of memory used and files opened. All allocated
   memory and opened files are cleaned up prior to normal program exit.

o  Fixed problem where Q & M traces were not being freed properly.

o  Fixed problem where bilink structures were not being freed properly.

o  Fixed omission -- output combined seeks in addition to read and
   write seeks.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoA couple of weeks ago Ming Zhang had noted that btt was using tremendous
Alan D. Brunelle [Fri, 13 Apr 2007 18:12:47 +0000 (20:12 +0200)]
A couple of weeks ago Ming Zhang had noted that btt was using tremendous
amounts of memory to accomplish a run. After looking at the code, and
doing some testing, I determined the cause - please find a patch to the
latest tree that seems to fix the problem for me...

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] Add store barrier defines for a bunch of archs
Bas Zoetekouw [Fri, 6 Apr 2007 15:46:09 +0000 (17:46 +0200)]
[PATCH] Add store barrier defines for a bunch of archs

This makes blktrace work/compile on: alpha, hppa, sparc, m68k, mips and arm.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoSome fixes - added in 4 figures, fixed an error in a section label.
Alan D. Brunelle [Tue, 6 Mar 2007 19:18:07 +0000 (20:18 +0100)]
Some fixes - added in 4 figures, fixed an error in a section label.

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFix warning in output.c where __u64 is a long, not a long long
Alan D. Brunelle [Mon, 5 Mar 2007 17:20:37 +0000 (18:20 +0100)]
Fix warning in output.c where __u64 is a long, not a long long

Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
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>