-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add block_bio_* tracing #57
base: master
Are you sure you want to change the base?
Conversation
Add -B option that traces block_bio_queue and block_bio_complete instead of block_rq_*, so that things like ext4 lazy init show up too. Without this patch: # bin/iosnoop 1 Tracing block I/O for 1 seconds (buffered)... COMM PID TYPE DEV BLOCK BYTES LATms dmcrypt_writ 3432 W 8,0 5251285248 1048576 2.53 dmcrypt_writ 3432 WS 8,0 5251287296 1048576 4.86 dmcrypt_writ 3432 W 8,0 5251289344 1048576 2.53 dmcrypt_writ 3432 WS 8,0 5251291392 1048576 4.87 With it: # bin/iosnoop -B 1 Tracing block I/O for 1 seconds (buffered)... COMM PID TYPE DEV BLOCK BYTES LATms ext4lazyinit 13030 W 253,18 5251324160 1048576 6.51 ext4lazyinit 13030 WS 253,18 5251326208 1048576 6.56 ext4lazyinit 13030 WS 253,23 1476450560 1048576 6.56 ext4lazyinit 13030 W 253,18 5251328256 1048576 4.73 ext4lazyinit 13030 WS 253,18 5251330304 1048576 7.08 ext4lazyinit 13030 WS 253,23 1476454656 1048576 7.08 jbd2/dm-8-24 2472 WS 253,4 3967160 4096 0.79 jbd2/dm-8-24 2472 WS 253,4 3967168 4096 0.77 jbd2/dm-8-24 2472 WS 253,4 3967176 4096 0.76 jbd2/dm-8-24 2472 WS 253,4 3967184 4096 0.76 jbd2/dm-8-24 2472 WS 253,4 3967192 4096 0.76 jbd2/dm-8-24 2472 WS 253,4 3967200 4096 0.76 jbd2/dm-8-24 2472 WS 253,4 3967208 4096 0.76 jbd2/dm-8-24 2472 WFS 253,4 3967216 4096 7.90 ext4lazyinit 13030 W 253,18 5251332352 1048576 4.80 ext4lazyinit 13030 WS 253,18 5251334400 1048576 7.16 ext4lazyinit 13030 WS 253,23 1476458752 1048576 7.17 Using -B and -Q at the same time is not supported. Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
How is block_bio_queue different to block_rq_insert (ie, -Q)? I can see that they are called from different places, and have the plug/unplug stuff between them, but I'm wondering how we can neatly explain this and how it was affecting your workload? I'm happy with the change, just need to understand it first. |
As far as I can tell, tracing
While with
This is while doing
|
Disclaimer: I don't necessarily need it merged as-is, but it may be helpful for others who stumble upon a similar problem.
I scratched my head today trying to explain the IO on a disk, as it wasn't showing up in
iosnoop
output in a manner that would allow me to pinpoint what exactly is that IO.So I hacked in tracing
block_bio_queue
andblock_bio_complete
, et voilaThis patch adds
-B
option that tracesblock_bio_queue
andblock_bio_complete
instead ofblock_rq_*
, and is mutually exclusive with-Q
.