From patchwork Wed Aug 16 01:27:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yu Kuai X-Patchwork-Id: 13354478 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 75250C04A6A for ; Wed, 16 Aug 2023 01:31:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241044AbjHPBa4 (ORCPT ); Tue, 15 Aug 2023 21:30:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241113AbjHPBaw (ORCPT ); Tue, 15 Aug 2023 21:30:52 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC4AC1BF8; Tue, 15 Aug 2023 18:30:51 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4RQVvX1wtfz4f3mHp; Wed, 16 Aug 2023 09:30:48 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP4 (Coremail) with SMTP id gCh0CgAH5KbHJtxkQuVAAw--.55976S4; Wed, 16 Aug 2023 09:30:49 +0800 (CST) From: Yu Kuai To: tj@kernel.org, josef@toxicpanda.com, axboe@kernel.dk, yukuai3@huawei.com, mkoutny@suse.com Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai1@huaweicloud.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: [PATCH -next v2 0/4] cleanup and fixes for 'carryover_ios/bytes' Date: Wed, 16 Aug 2023 09:27:04 +0800 Message-Id: <20230816012708.1193747-1-yuk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AIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUb XdbUUUUUU== X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Yu Kuai changes in v2: - fix missing adjustment in throtl_log(). Patch 1 print signed value for 'carryover_ios/bytes' to user. Patch 2 fix that comparation ”unsigned value < negative value“ will pass, causing that io won't be throttled in the silce. Patch 3,4 fix that 'carryover_ios/bytes' is not cleared while 'io/bytes_disp' is cleared, causing that throttle is not accurate. Yu Kuai (4): blk-throttle: print signed value 'carryover_bytes/ios' for user blk-throttle: fix wrong comparation while 'carryover_ios/bytes' is negative blk-throttle: use calculate_io/bytes_allowed() for throtl_trim_slice() blk-throttle: consider 'carryover_ios/bytes' in throtl_trim_slice() block/blk-throttle.c | 112 +++++++++++++++++++++---------------------- block/blk-throttle.h | 4 +- 2 files changed, 58 insertions(+), 58 deletions(-)