lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Feb 2016 14:01:24 -0800
From:	Shaohua Li <shli@...com>
To:	<linux-kernel@...r.kernel.org>, <linux-block@...r.kernel.org>
CC:	<axboe@...nel.dk>, <tj@...nel.org>,
	Vivek Goyal <vgoyal@...hat.com>,
	"jmoyer @ redhat . com" <jmoyer@...hat.com>, <Kernel-team@...com>
Subject: [PATCH V2 09/13] blk-throttle: add trace for new proporation throttle

The trace log is very helpful to track bug and performance issues.

Signed-off-by: Shaohua Li <shli@...com>
---
 block/blk-throttle.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 01ca04e..68e2598 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1153,6 +1153,7 @@ static void tg_update_share(struct throtl_data *td, struct throtl_grp *tg)
 			sq->parent_sq->share * sq->acting_weight /
 				sq->parent_sq->children_weight,
 			1);
+		throtl_log(sq, "new share=%u", sq->share);
 	}
 }
 
@@ -1168,6 +1169,8 @@ static void tg_update_active_time(struct throtl_grp *tg)
 			sq->acting_weight = sq->weight;
 			sq->parent_sq->children_weight += sq->acting_weight;
 			tg = sq_to_tg(sq);
+			throtl_log(sq, "active weight=%u parent_weight=%u",
+				sq->acting_weight, sq->parent_sq->children_weight);
 		}
 		sq = sq->parent_sq;
 	}
@@ -1206,6 +1209,8 @@ static void detect_inactive_cg(struct throtl_grp *tg)
 				sq->parent_sq->children_weight -= sq->acting_weight;
 				sq->acting_weight = 0;
 				update_share = true;
+				throtl_log(sq, "inactive weight=%u parent_weight=%u",
+					sq->weight, sq->parent_sq->children_weight);
 			}
 		}
 	}
@@ -1621,6 +1626,10 @@ static void __tg_set_weight(struct throtl_grp *tg, unsigned int weight)
 			psq->children_weight -= old_weight - weight;
 		tg->service_queue.acting_weight = weight;
 	}
+	throtl_log(&tg->service_queue, "weight=%d parent_weight=%d",
+		tg->service_queue.acting_weight,
+		tg->service_queue.parent_sq ?
+			tg->service_queue.parent_sq->children_weight : 0);
 
 	tg_update_share(tg->td, tg);
 }
-- 
2.6.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ