From patchwork Mon Feb 22 22:01:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaohua Li X-Patchwork-Id: 8384071 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B8AF0C0553 for ; Mon, 22 Feb 2016 22:03:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D99F3205C2 for ; Mon, 22 Feb 2016 22:03:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 07AF5204D1 for ; Mon, 22 Feb 2016 22:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755733AbcBVWDZ (ORCPT ); Mon, 22 Feb 2016 17:03:25 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:24475 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755550AbcBVWBd (ORCPT ); Mon, 22 Feb 2016 17:01:33 -0500 Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.15.0.59/8.15.0.59) with SMTP id u1MLpgGk005335 for ; Mon, 22 Feb 2016 14:01:33 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=GDeGmDMLxRRaUTB/bsILkePcxGAbHfwQkJv89NapInU=; b=FPDyI8qPpCIkvJ/Crq4UBvmtlCIIoVe44/SSihD7+lrFz+TFo55SAzavbWZmBWZEQgni HCtBK1HzCXL3g9opgbOu+Z6ZbEXei3jyaH8lF8ue2wpXTAlznh6qyO+a6JdzKLJ8mwVR bR77cQyzBTCwvjQRiOoZpK7b3Oa/El59lWs= Received: from mail.thefacebook.com ([199.201.64.23]) by m0001303.ppops.net with ESMTP id 2189838e95-4 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Mon, 22 Feb 2016 14:01:33 -0800 Received: from mx-out.facebook.com (192.168.52.123) by PRN-CHUB02.TheFacebook.com (192.168.16.12) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 22 Feb 2016 14:01:31 -0800 Received: from facebook.com (2401:db00:11:d0a2:face:0:39:0) by mx-out.facebook.com (10.212.236.89) with ESMTP id d482bb18d9af11e586ab0002c95209d8-dfbfa270 for ; Mon, 22 Feb 2016 14:01:31 -0800 Received: by devbig084.prn1.facebook.com (Postfix, from userid 11222) id 671F247E31E2; Mon, 22 Feb 2016 14:01:29 -0800 (PST) From: Shaohua Li To: , CC: , , Vivek Goyal , "jmoyer @ redhat . com" , Subject: [PATCH V2 09/13] blk-throttle: add trace for new proporation throttle Date: Mon, 22 Feb 2016 14:01:24 -0800 Message-ID: <75ba73b56741053c390d1e391a36e2f4a4b5de95.1456178093.git.shli@fb.com> X-Mailer: git-send-email 2.6.5 In-Reply-To: References: X-FB-Internal: Safe MIME-Version: 1.0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-02-22_08:, , signatures=0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The trace log is very helpful to track bug and performance issues. Signed-off-by: Shaohua Li --- 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); }