* [PATCH] block: trace all devices plug operation.
@ 2013-08-21 0:43 majianpeng
2013-09-02 1:54 ` majianpeng
0 siblings, 1 reply; 3+ messages in thread
From: majianpeng @ 2013-08-21 0:43 UTC (permalink / raw)
To: axboe; +Cc: LKML
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1167 bytes --]
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 <majianpeng@gmail.com>
---
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Ç+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] block: trace all devices plug operation.
2013-08-21 0:43 [PATCH] block: trace all devices plug operation majianpeng
@ 2013-09-02 1:54 ` majianpeng
2013-09-16 1:02 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: majianpeng @ 2013-09-02 1:54 UTC (permalink / raw)
To: axboe; +Cc: LKML
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 1253 bytes --]
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 <majianpeng@gmail.com>
>---
> 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Ç+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] block: trace all devices plug operation.
2013-09-02 1:54 ` majianpeng
@ 2013-09-16 1:02 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2013-09-16 1:02 UTC (permalink / raw)
To: majianpeng; +Cc: LKML
On Mon, Sep 02 2013, majianpeng wrote:
> Hi axboe:
> How about this patch?
Applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-16 1:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-21 0:43 [PATCH] block: trace all devices plug operation majianpeng
2013-09-02 1:54 ` majianpeng
2013-09-16 1:02 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).