* [PATCH] block: add calls to split trace point
@ 2015-11-17 18:53 Mike Krinkin
2015-11-18 14:01 ` Christoph Hellwig
2015-12-03 14:32 ` [PATCH] block: add call " Mike Krinkin
0 siblings, 2 replies; 7+ messages in thread
From: Mike Krinkin @ 2015-11-17 18:53 UTC (permalink / raw)
To: axboe; +Cc: hch, kent.overstreet, dmonakhov, linux-kernel, Mike Krinkin
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] block: add calls to split trace point
2015-11-17 18:53 [PATCH] block: add calls to split trace point Mike Krinkin
@ 2015-11-18 14:01 ` Christoph Hellwig
2015-12-02 8:25 ` Mike Krinkin
2015-12-03 14:32 ` [PATCH] block: add call " Mike Krinkin
1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2015-11-18 14:01 UTC (permalink / raw)
To: Mike Krinkin; +Cc: axboe, hch, kent.overstreet, dmonakhov, linux-kernel
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] block: add calls to split trace point
2015-11-18 14:01 ` Christoph Hellwig
@ 2015-12-02 8:25 ` Mike Krinkin
2015-12-02 17:06 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Mike Krinkin @ 2015-12-02 8:25 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: axboe, kent.overstreet, dmonakhov, linux-kernel
Hi Jens,
i would like to check status of the patch, will the patch be applied?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] block: add calls to split trace point
2015-12-02 8:25 ` Mike Krinkin
@ 2015-12-02 17:06 ` Jens Axboe
2015-12-02 19:09 ` Mike Krinkin
0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2015-12-02 17:06 UTC (permalink / raw)
To: Mike Krinkin, Christoph Hellwig; +Cc: kent.overstreet, dmonakhov, linux-kernel
On 12/02/2015 01:25 AM, Mike Krinkin wrote:
> Hi Jens,
>
> i would like to check status of the patch, will the patch be applied?
>
Why aren't you just putting the split trace call into blk_queue_split()?
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] block: add calls to split trace point
2015-12-02 17:06 ` Jens Axboe
@ 2015-12-02 19:09 ` Mike Krinkin
0 siblings, 0 replies; 7+ messages in thread
From: Mike Krinkin @ 2015-12-02 19:09 UTC (permalink / raw)
To: Jens Axboe; +Cc: Christoph Hellwig, kent.overstreet, dmonakhov, linux-kernel
On Wed, Dec 02, 2015 at 10:06:09AM -0700, Jens Axboe wrote:
> On 12/02/2015 01:25 AM, Mike Krinkin wrote:
> >Hi Jens,
> >
> >i would like to check status of the patch, will the patch be applied?
> >
>
> Why aren't you just putting the split trace call into blk_queue_split()?
Do you mean after split? Something like this:
if (split) {
/* there isn't chance to merge the splitted 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;
}
block_split trace event docs says that it expects "bio being split", i
understood it as "bio before split". But scarcely someone depends on
this behaviour, so i'll resend the patch, is it ok?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] block: add call to split trace point
2015-11-17 18:53 [PATCH] block: add calls to split trace point Mike Krinkin
2015-11-18 14:01 ` Christoph Hellwig
@ 2015-12-03 14:32 ` Mike Krinkin
2015-12-03 17:18 ` Jens Axboe
1 sibling, 1 reply; 7+ messages in thread
From: Mike Krinkin @ 2015-12-03 14:32 UTC (permalink / raw)
To: axboe; +Cc: hch, kent.overstreet, dmonakhov, linux-kernel, Mike Krinkin
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] block: add call to split trace point
2015-12-03 14:32 ` [PATCH] block: add call " Mike Krinkin
@ 2015-12-03 17:18 ` Jens Axboe
0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2015-12-03 17:18 UTC (permalink / raw)
To: Mike Krinkin; +Cc: hch, kent.overstreet, dmonakhov, linux-kernel
On 12/03/2015 07:32 AM, Mike Krinkin wrote:
> 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.
Looks good, queued up for 4.5.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-12-03 17:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-17 18:53 [PATCH] block: add calls to split trace point Mike Krinkin
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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.