From: Mike Krinkin <krinkin.m.u@gmail.com>
To: axboe@kernel.dk
Cc: hch@lst.de, kent.overstreet@gmail.com, dmonakhov@openvz.org,
linux-kernel@vger.kernel.org,
Mike Krinkin <krinkin.m.u@gmail.com>
Subject: [PATCH] block: add calls to split trace point
Date: Tue, 17 Nov 2015 21:53:52 +0300 [thread overview]
Message-ID: <1447786432-7553-1-git-send-email-krinkin.m.u@gmail.com> (raw)
There is a split tracepoint that is supposed to be called before
splitting a bio, and it was actually called in bio_split function
until commit 4b1faf931650d4a35b2a ("block: Kill bio_pair_split()").
But now, no one reports splits, so this patch adds calls to
trace_block_split back right before bio_split.
Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com>
---
block/blk-merge.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index de5716d8..832ec49 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -7,6 +7,8 @@
#include <linux/blkdev.h>
#include <linux/scatterlist.h>
+#include <trace/events/block.h>
+
#include "blk.h"
static struct bio *blk_bio_discard_split(struct request_queue *q,
@@ -49,6 +51,7 @@ static struct bio *blk_bio_discard_split(struct request_queue *q,
if (split_sectors > tmp)
split_sectors -= tmp;
+ trace_block_split(q, bio, bio->bi_iter.bi_sector + split_sectors);
return bio_split(bio, split_sectors, GFP_NOIO, bs);
}
@@ -65,6 +68,7 @@ static struct bio *blk_bio_write_same_split(struct request_queue *q,
if (bio_sectors(bio) <= q->limits.max_write_same_sectors)
return NULL;
+ trace_block_split(q, bio, bio->bi_iter.bi_sector);
return bio_split(bio, q->limits.max_write_same_sectors, GFP_NOIO, bs);
}
@@ -117,6 +121,7 @@ new_segment:
return NULL;
split:
*segs = nsegs;
+ trace_block_split(q, bio, bio->bi_iter.bi_sector + sectors);
return bio_split(bio, sectors, GFP_NOIO, bs);
}
--
1.9.1
next reply other threads:[~2015-11-17 18:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 18:53 Mike Krinkin [this message]
2015-11-18 14:01 ` Christoph Hellwig
2015-12-02 8:25 ` Mike Krinkin
2015-12-02 17:06 ` Jens Axboe
2015-12-02 19:09 ` Mike Krinkin
2015-12-03 14:32 ` [PATCH] block: add call " Mike Krinkin
2015-12-03 17:18 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447786432-7553-1-git-send-email-krinkin.m.u@gmail.com \
--to=krinkin.m.u@gmail.com \
--cc=axboe@kernel.dk \
--cc=dmonakhov@openvz.org \
--cc=hch@lst.de \
--cc=kent.overstreet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®