Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1283085

[PATCH] block: add call to split trace point

From Mike Krinkin <krinkin.m.u@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] block: add call to split trace point
Date 2015-12-03 15:40 +0100
Message-ID <qBDd8-6lI-19@gated-at.bofh.it> (permalink)
References <qvTDY-m1-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


There is a split tracepoint that is supposed to be called when
bio is splitted, and it was called in bio_split function until
commit 4b1faf931650d4a35b2a ("block: Kill bio_pair_split()").
But now, no one reports splits, so this patch adds call to
trace_block_split back in blk_queue_split right after split.

Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com>
---
 block/blk-merge.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index de5716d8..3bb4537 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,
@@ -143,6 +145,7 @@ void blk_queue_split(struct request_queue *q, struct bio **bio,
 		split->bi_rw |= REQ_NOMERGE;
 
 		bio_chain(split, *bio);
+		trace_block_split(q, split, (*bio)->bi_iter.bi_sector);
 		generic_make_request(*bio);
 		*bio = split;
 	}
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] block: add call to split trace point Mike Krinkin <krinkin.m.u@gmail.com> - 2015-12-03 15:40 +0100
  Re: [PATCH] block: add call to split trace point Jens Axboe <axboe@kernel.dk> - 2015-12-03 18:20 +0100

csiph-web