From patchwork Tue Oct 18 11:12:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 4092 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1898346wrs; Tue, 18 Oct 2022 04:15:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4xTDHPGambLJUibsRxycr5KKuv7FDlLB3tlHKC7Uu4ZWvtVnX3+ArWzeTyrxJ/W5YqEZwu X-Received: by 2002:a17:903:2616:b0:17f:8042:723a with SMTP id jd22-20020a170903261600b0017f8042723amr2592821plb.106.1666091756845; Tue, 18 Oct 2022 04:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666091756; cv=none; d=google.com; s=arc-20160816; b=ZFYZ+3lB/GAVaE7hFBzx9E8ixsPuGfLpRIRRsl2HWP+omxhCRGmfXs27jMH72/YFQF VUr+R70TNV9P8tMKjvJeGHI3ljBA7pEGPO+yuDAQyy07V+bnkvjbTztlkP7sjTFk8nuQ UKL/NcT6JYzF5/FpYtZMlinv+IGLViOsOSgLCTpGyAwSgMdzaBv6dmFhsPLC41CBpego xcbrTqzXSEcCwgK4aLxDVpGqE3FEfk27IqslORRWbFfHGGWRzI0gm8KDmUqKWz2KHDqD x10vwZtbWr62BXlHkCgc68AjKCYCEByD1GribPPiIiKPM3e/hq+wJdLerxVwwTaVQvUL FDGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=0ANydHnjPvJPrQwATQstaHLhY/zUlDsUlQh/y+zNFV8=; b=KE85JD6BsWE9cu0PmxpnC1zbKH6cSMPcHQEAz4ZS3f7vZPSyWbqSBUfARb7MQtdKTM jfMWHIJ+QnpWcWG34LNgvSopYYQzci4jVNYXUvtq5zbQvIIrW3ejDN+Ii4/sNBPnVdhb +TOXQdBiCMKo2FJT/Up9v5M1Y6JqImXzBrz0Ki4/4JhmhedTgzdHpKzEZUQBnSnOgQbc 3Hk5mUtxf6BCRui0X5epMQ9PgopSa3G1xmXFRITr4qEU+e8prz0RxSBGGPQfx+pBlVZx A0d80eZqIEJKQ/P5l5iOQpzizP/clAjlzqrcpACWHNriksUlv3Fp46opAU2e+ZX/SlG8 lGhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d184-20020a6336c1000000b0043a279baf66si14209753pga.115.2022.10.18.04.15.43; Tue, 18 Oct 2022 04:15:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbiJRLMy (ORCPT + 99 others); Tue, 18 Oct 2022 07:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbiJRLMv (ORCPT ); Tue, 18 Oct 2022 07:12:51 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 021C4B6038; Tue, 18 Oct 2022 04:12:46 -0700 (PDT) Received: from kwepemi500016.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MsB150GBLzVhxN; Tue, 18 Oct 2022 19:08:09 +0800 (CST) Received: from huawei.com (10.174.178.129) by kwepemi500016.china.huawei.com (7.221.188.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 19:12:44 +0800 From: Kemeng Shi To: , , CC: , , , Subject: [PATCH v2 2/3] block: Correct comment for scale_cookie_change Date: Tue, 18 Oct 2022 19:12:39 +0800 Message-ID: <20221018111240.22612-3-shikemeng@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20221018111240.22612-1-shikemeng@huawei.com> References: <20221018111240.22612-1-shikemeng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.178.129] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500016.china.huawei.com (7.221.188.220) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747023830038616219?= X-GMAIL-MSGID: =?utf-8?q?1747023830038616219?= Default queue depth of iolatency_grp is unlimited, so we scale down quickly(once by half) in scale_cookie_change. Remove the "subtract 1/16th" part which is not the truth and add the actual way we scale down. Signed-off-by: Kemeng Shi Reviewed-by: Josef Bacik --- block/blk-iolatency.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index b24d7b788ba3..2c574f98c8d1 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -364,9 +364,11 @@ static void scale_cookie_change(struct blk_iolatency *blkiolat, } /* - * Change the queue depth of the iolatency_grp. We add/subtract 1/16th of the + * Change the queue depth of the iolatency_grp. We add 1/16th of the * queue depth at a time so we don't get wild swings and hopefully dial in to - * fairer distribution of the overall queue depth. + * fairer distribution of the overall queue depth. We halve the queue depth + * at a time so we can scale down queue depth quickly from default unlimited + * to target. */ static void scale_change(struct iolatency_grp *iolat, bool up) {