All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@fb.com>
To: <linux-kernel@vger.kernel.org>, <linux-block@vger.kernel.org>
Cc: <axboe@kernel.dk>, <tj@kernel.org>,
	Vivek Goyal <vgoyal@redhat.com>,
	"jmoyer @ redhat . com" <jmoyer@redhat.com>, <Kernel-team@fb.com>
Subject: [PATCH V2 09/13] blk-throttle: add trace for new proporation throttle
Date: Mon, 22 Feb 2016 14:01:24 -0800	[thread overview]
Message-ID: <75ba73b56741053c390d1e391a36e2f4a4b5de95.1456178093.git.shli@fb.com> (raw)
In-Reply-To: <cover.1456178093.git.shli@fb.com>

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

Signed-off-by: Shaohua Li <shli@fb.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

  parent reply	other threads:[~2016-02-22 22:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 22:01 [PATCH V2 00/13] block-throttle: proportional throttle Shaohua Li
2016-02-22 22:01 ` [PATCH V2 01/13] block: estimate disk performance Shaohua Li
2016-02-22 22:01 ` [PATCH V2 02/13] blk-throttle: cleanup io cost related stuff Shaohua Li
2016-02-22 22:01 ` [PATCH V2 03/13] blk-throttle: add abstract to index data Shaohua Li
2016-02-22 22:01 ` [PATCH V2 04/13] blk-throttle: weight based throttling Shaohua Li
2016-02-22 22:01 ` [PATCH V2 05/13] blk-throttling: detect inactive cgroup Shaohua Li
2016-02-22 22:01 ` [PATCH V2 06/13] blk-throttle: add per-cgroup data Shaohua Li
2016-02-22 22:01 ` [PATCH V2 07/13] blk-throttle: add interface for proporation based throttle Shaohua Li
2016-02-22 22:01 ` [PATCH V2 08/13] blk-throttle: add cgroup2 interface Shaohua Li
2016-02-22 22:01 ` Shaohua Li [this message]
2016-02-22 22:01 ` [PATCH V2 10/13] blk-throttle: over estimate bandwidth Shaohua Li
2016-02-22 22:01 ` [PATCH V2 11/13] blk-throttle: shrink cgroup share if its target is overestimated Shaohua Li
2016-02-22 22:01 ` [PATCH V2 12/13] blk-throttle: restore shrinked cgroup share Shaohua Li
2016-02-22 22:01 ` [PATCH V2 13/13] blk-throttle: detect wrong shrink Shaohua Li
2016-02-28 15:02 ` [PATCH V2 00/13] block-throttle: proportional throttle Pavel Machek
2016-03-01  5:19   ` Shaohua Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=75ba73b56741053c390d1e391a36e2f4a4b5de95.1456178093.git.shli@fb.com \
    --to=shli@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=axboe@kernel.dk \
    --cc=jmoyer@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.