* [PATCH] blk-mq: add trace block plug and unplug for multiple queues
@ 2019-03-26 13:19 Yufen Yu
2019-03-27 8:13 ` Christoph Hellwig
2019-04-02 14:57 ` Jens Axboe
0 siblings, 2 replies; 4+ messages in thread
From: Yufen Yu @ 2019-03-26 13:19 UTC (permalink / raw)
To: axboe, linux-block; +Cc: hch, osandov, ming.lei
For now, we just trace plug for single queue device or drivers
provide .commit_rqs, and have not trace plug for multiple queues
device. But, unplug events will be recorded when call
blk_mq_flush_plug_list(). Then, trace events will be asymmetrical,
just have unplug and without plug.
This patch add trace plug and unplug for multiple queues device in
blk_mq_make_request(). After that, we can accurately trace plug and
unplug for multiple queues.
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
---
block/blk-mq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 5486c7d8b408..4aa673a6d285 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1987,11 +1987,13 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
plug->rq_count--;
}
blk_add_rq_to_plug(plug, rq);
+ trace_block_plug(q);
blk_mq_put_ctx(data.ctx);
if (same_queue_rq) {
data.hctx = same_queue_rq->mq_hctx;
+ trace_block_unplug(q, 1, true);
blk_mq_try_issue_directly(data.hctx, same_queue_rq,
&cookie, false, true);
}
--
2.16.2.dirty
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] blk-mq: add trace block plug and unplug for multiple queues
2019-03-26 13:19 [PATCH] blk-mq: add trace block plug and unplug for multiple queues Yufen Yu
@ 2019-03-27 8:13 ` Christoph Hellwig
2019-04-02 14:34 ` yuyufen
2019-04-02 14:57 ` Jens Axboe
1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2019-03-27 8:13 UTC (permalink / raw)
To: Yufen Yu; +Cc: axboe, linux-block, hch, osandov, ming.lei
On Tue, Mar 26, 2019 at 09:19:25PM +0800, Yufen Yu wrote:
> For now, we just trace plug for single queue device or drivers
> provide .commit_rqs, and have not trace plug for multiple queues
> device. But, unplug events will be recorded when call
> blk_mq_flush_plug_list(). Then, trace events will be asymmetrical,
> just have unplug and without plug.
>
> This patch add trace plug and unplug for multiple queues device in
> blk_mq_make_request(). After that, we can accurately trace plug and
> unplug for multiple queues.
>
> Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] blk-mq: add trace block plug and unplug for multiple queues
2019-03-27 8:13 ` Christoph Hellwig
@ 2019-04-02 14:34 ` yuyufen
0 siblings, 0 replies; 4+ messages in thread
From: yuyufen @ 2019-04-02 14:34 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: axboe, linux-block, osandov, ming.lei
ping ?
On 2019/3/27 16:13, Christoph Hellwig wrote:
> On Tue, Mar 26, 2019 at 09:19:25PM +0800, Yufen Yu wrote:
>> For now, we just trace plug for single queue device or drivers
>> provide .commit_rqs, and have not trace plug for multiple queues
>> device. But, unplug events will be recorded when call
>> blk_mq_flush_plug_list(). Then, trace events will be asymmetrical,
>> just have unplug and without plug.
>>
>> This patch add trace plug and unplug for multiple queues device in
>> blk_mq_make_request(). After that, we can accurately trace plug and
>> unplug for multiple queues.
>>
>> Signed-off-by: Yufen Yu <yuyufen@huawei.com>
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] blk-mq: add trace block plug and unplug for multiple queues
2019-03-26 13:19 [PATCH] blk-mq: add trace block plug and unplug for multiple queues Yufen Yu
2019-03-27 8:13 ` Christoph Hellwig
@ 2019-04-02 14:57 ` Jens Axboe
1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2019-04-02 14:57 UTC (permalink / raw)
To: Yufen Yu, linux-block; +Cc: hch, osandov, ming.lei
On 3/26/19 7:19 AM, Yufen Yu wrote:
> For now, we just trace plug for single queue device or drivers
> provide .commit_rqs, and have not trace plug for multiple queues
> device. But, unplug events will be recorded when call
> blk_mq_flush_plug_list(). Then, trace events will be asymmetrical,
> just have unplug and without plug.
>
> This patch add trace plug and unplug for multiple queues device in
> blk_mq_make_request(). After that, we can accurately trace plug and
> unplug for multiple queues.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-02 14:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26 13:19 [PATCH] blk-mq: add trace block plug and unplug for multiple queues Yufen Yu
2019-03-27 8:13 ` Christoph Hellwig
2019-04-02 14:34 ` yuyufen
2019-04-02 14:57 ` 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.