block: trace all devices plug operation.
PATCH 1/1 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(-)
block/blk-core.c +2 -4
@@ -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 ) {
Signature · 2 lines
1.8.3
ÿôèº{.nÇ+‰·Ÿ®‰†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºÊ‡Ú™ë,j¢f£¢·hš�ï�êÿ‘êçz_è®(階ŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨èÚ&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿÃÿ¶ìÿ¢¸?–I¥Hi axboe:
How about this patch?
Thanks!
Jianpeng Ma
Quoted 33 lines
In func
blk_queue_bio, if list of plug is empty,it will callblk_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.
Usingrequest_countto 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(-)block/blk-core.c +2
-4@@ -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 ) {Signature · 1 line
1.8.3�翳簕.n�+壏煯壄�+%娝�遍荻w�簕.n�+壏{炳G珴�妠ay�蕠跈�,jf"穐殢飦�戧鐉_璁(殠娸"濟�m���G珴�⒏?櫒璀�&x忈秈O曟瑉窔v豝�m����鹅�⒏?朓�
Quoted 2 lines · majianpeng
Hi axboe:
How about this patch?
Applied.
Signature · 1 line
Jens Axboe