summaryrefslogtreecommitdiff
path: root/btt/inlines.h
AgeCommit message (Collapse)Author
2009-02-13btt general cleanup plus valgrind cleanAlan D. Brunelle
Lots of general clean up of code, getting interfaces across different files to be similar (all are no alloc/free), and made it valgrind clean. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com
2008-05-09Added S2G times + fixed up -X output to include X2XAlan D. Brunelle
Including Q2Q, Q2G, S2G, G2I, Q2M, I2D, M2D, D2C, Q2C. S2G is part of Q2G, and shows the number of times we had to sleep to get a request. Ignored 0-byte I/Os - coming from barrier I/Os...
2008-02-13Cleanups: Fixed IOPs in btt left over at end of runAlan D. Brunelle
o Using valgrind, determined we had Q IOPs left over that weren't used. Added "all" list, and then deleted these at end. o Removed old debug stuff (COUNT_IOS, DEBUG, ...) o Fixed a bunch of white space at end of lines. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
2007-12-10Separated out g/i/m trace handling.Alan D. Brunelle
Also separated out DM-device calculations.
2007-09-10Major revamping (ver 2.0)Alan D. Brunelle
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>
2007-04-14Combine all outstanding patches into one /big patch/Alan D. Brunelle
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>
2007-04-13A couple of weeks ago Ming Zhang had noted that btt was using tremendousAlan D. Brunelle
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>
2007-03-05BTT: Added user guideAlan D. Brunelle
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>
2007-02-26Add Q and D histograms (based upon IO size)Alan D. Brunelle
Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-26Fix remap handling (again).Alan D. Brunelle
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>
2007-02-06[PATCH]: btt - major fixes and speed improvementsAlan D. Brunelle
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>
2006-12-01[PATCH] BTT patch: (3/3) time bounded trace analysisJens Axboe
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>
2006-12-01[PATCH] BTT patch: (2/3) per-IO stream outputJens Axboe
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>
2006-10-03[PATCH] Convert to using on-the-fly RB trees, no post-traversal.Alan David Brunelle
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>
2006-09-15[PATCH] btt: Cleaned up patches for SEEK additions, DM, Q2A and seek fixesAlan D. Brunelle
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>
2006-05-26[PATCH] btt: finalize the INLINE fixupJens Axboe
2006-05-26[PATCH] Add Alan's btt toolJens Axboe