2013-08-21 00:43:29

by majianpeng

[permalink] [raw]
Subject: [PATCH] block: trace all devices plug operation.

In func blk_queue_bio, if list of plug is empty,it will call
blk_trace_plug.
If process deal with a single device,it't ok.But if process deal with
multi devices,it only trace the first device.
Using request_count to judge, it can soleve this problem.

In addition, i modify the comment.

Signed-off-by: Jianpeng Ma <[email protected]>
---
block/blk-core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 93a18d1..91037f7 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1549,11 +1549,9 @@ get_rq:
if (plug) {
/*
* If this is the first request added after a plug, fire
- * of a plug trace. If others have been added before, check
- * if we have multiple devices in this plug. If so, make a
- * note to sort the list before dispatch.
+ * of a plug trace.
*/
- if (list_empty(&plug->list))
+ if (!request_count)
trace_block_plug(q);
else {
if (request_count >= BLK_MAX_REQUEST_COUNT) {
--
1.8.3
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?


2013-09-02 01:54:21

by majianpeng

[permalink] [raw]
Subject: Re: [PATCH] block: trace all devices plug operation.

Hi axboe:
How about this patch?

Thanks!
Jianpeng Ma
>In func blk_queue_bio, if list of plug is empty,it will call
>blk_trace_plug.
>If process deal with a single device,it't ok.But if process deal with
>multi devices,it only trace the first device.
>Using request_count to judge, it can soleve this problem.
>
>In addition, i modify the comment.
>
>Signed-off-by: Jianpeng Ma <[email protected]>
>---
> block/blk-core.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
>diff --git a/block/blk-core.c b/block/blk-core.c
>index 93a18d1..91037f7 100644
>--- a/block/blk-core.c
>+++ b/block/blk-core.c
>@@ -1549,11 +1549,9 @@ get_rq:
> if (plug) {
> /*
> * If this is the first request added after a plug, fire
>- * of a plug trace. If others have been added before, check
>- * if we have multiple devices in this plug. If so, make a
>- * note to sort the list before dispatch.
>+ * of a plug trace.
> */
>- if (list_empty(&plug->list))
>+ if (!request_count)
> trace_block_plug(q);
> else {
> if (request_count >= BLK_MAX_REQUEST_COUNT) {
>--
>1.8.3????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2013-09-16 01:02:45

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH] block: trace all devices plug operation.

On Mon, Sep 02 2013, majianpeng wrote:
> Hi axboe:
> How about this patch?

Applied.

--
Jens Axboe