From patchwork Mon Dec 5 11:57:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13064116 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EED2EC4321E for ; Mon, 5 Dec 2022 03:58:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231388AbiLED6D (ORCPT ); Sun, 4 Dec 2022 22:58:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230307AbiLED6B (ORCPT ); Sun, 4 Dec 2022 22:58:01 -0500 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94A99FCD3; Sun, 4 Dec 2022 19:57:58 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4NQVBS4RdJz4f3rpv; Mon, 5 Dec 2022 11:57:52 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgDXfq1CbI1jRaRVBg--.57323S2; Mon, 05 Dec 2022 11:57:55 +0800 (CST) From: Kemeng Shi To: tj@kernel.org, josef@toxicpanda.com, axboe@kernel.dk Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huawei.com, linfeilong@huawei.com, liuzhiqiang26@huawei.com Subject: [PATCH v3 0/9] A few bugfix and cleanup patches for blk-throttle Date: Mon, 5 Dec 2022 19:57:00 +0800 Message-Id: <20221205115709.251489-1-shikemeng@huaweicloud.com> X-Mailer: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nxnUUI43ZEXa7IU01mh7UUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Hi, this series contain a few patches to fix problem when on the default hierarchy, corret comment and so on. More details can be found in respective changelogs. Thanks. --- V2->V3: -Thanks for the review and advice from Tejun. Now all patches are acked by Tejun. -remove quotes around parent in corrected comment in patch "blk-throttle: correct stale comment in throtl_pd_init" -improve log message and rename throtl_tg_reach_low_limit to throtl_low_limit_reached. -drop patch "blk-throttle: avoid dead code in throtl_hierarchy_can_upgrade" --- V1->V2: -Thanks for the review and advice from Tejun. The corrected comment of "blk-throttle: correct stale comment in throtl_pd_init" and the solution of "blk-throttle: Fix that bps of child could exceed bps limited in parent" are from reply of Tejun. -Collect Ack from Tejun. -Fix the compile problem when CONFIG_BLK_DEV_THROTTLING_LOW is set. -Drop "blk-throttle: Limit whole system if root group is configured when on the default hierarchy", "blk-throttle: remove unnecessary check for validation of limit index" and "blk-throttle: remove unused variable td in tg_update_has_rules" -Add "blk-throttle: correct stale comment in throtl_pd_init" and "blk-throttle: avoid dead code in throtl_hierarchy_can_upgrade" -Use solution that set the BIO_BPS_THROTTLED flag only when the bio traversed the entire tree to fix that bps of child could exceed bps limited in parent in patch 2/10. -Improve the description and comment of most commits. --- Kemeng Shi (9): blk-throttle: correct stale comment in throtl_pd_init blk-throttle: Fix that bps of child could exceed bps limited in parent blk-throttle: ignore cgroup without io queued in blk_throtl_cancel_bios blk-throttle: correct calculation of wait time in tg_may_dispatch blk-throttle: simpfy low limit reached check in throtl_tg_can_upgrade blk-throttle: fix typo in comment of throtl_adjusted_limit blk-throttle: remove incorrect comment for tg_last_low_overflow_time blk-throttle: remove repeat check of elapsed time from last upgrade in throtl_hierarchy_can_downgrade blk-throttle: Use more siutable time_after check for update of slice_start block/blk-throttle.c | 102 +++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 47 deletions(-)