Message ID | 20221018111240.22612-2-shikemeng@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1898922wrs; Tue, 18 Oct 2022 04:16:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4RyvCaAFcFURnsTGKqvZTevgRtHKRNzz/lEAMKfdJ+L1KwRU0UhyhjSN35hhWldd6N8GNO X-Received: by 2002:a05:6a00:1488:b0:563:9d96:660f with SMTP id v8-20020a056a00148800b005639d96660fmr2464137pfu.0.1666091808260; Tue, 18 Oct 2022 04:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666091808; cv=none; d=google.com; s=arc-20160816; b=zXXg84ROK8/Ny+ybCSLppO62mXjkSJHUrmc8ig8FxIdWF92HWI4I2m25AZ/i/4zkAk zJPC2F1ODPNZ6yQJ0AOF4IF8K7uS0W4IJjP/5aI3LlPdph7T/5ROYsnN9piYX37fWcOU ZXkyYZeOKBT00p6ATKqHQXN3nytTe5W+jqcdJkGws/Bis+Wz48oDeS5oUx/IT3/lLuEV KupdOXR1xA0jLtyAzmria7mBhJ00NEABm6tLtQgPD5bX9dtKUzCxgT8nl8LOxbrN8g8z +2ngKnCnaiYOV9meNu0mViva0R7czQ2US/6qOE4KNCsVViUJR4Yw8352ICRhqvo6ovYT hNrA== 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=7GjXjSCriVkmV5rywwoYPGRZIZWy8/VdsSrc8tHO5Lw=; b=fl8oZcfJ8e2y7TiPDubOPEQ4tpVQwj6v/2ZA3buXIlezLIMhAc4yRCvUPJlWw3bDYA DQH1KiA9YYbcBhLlWVFmidtBWezhYap7JzLq96++/yN/7NLhwrnPKhvYipaL1TVzjiWx 0v84NTgQ/as8J76hmOph0J+7OdnfpCHgdK9oTYteQ+PEcgM2HCGWPu3w4CTQva1x+V6w 34Wn+vhYX+qYATUb5vyTJFbdNA7Gftsa7U5Pzdpx2FEBt8grMdG88VmapFwc7bFa/jqe pvzH6RN4RBGT591HgAdRj4S4X1bB8Ijyg+zv9Wjz1DbPLeKeaXAjt4Bc0bQs/7p1G3Da XD1Q== 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 bf5-20020a170902b90500b001842f55e713si13738266plb.321.2022.10.18.04.16.34; Tue, 18 Oct 2022 04:16:48 -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 S229949AbiJRLNC (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Tue, 18 Oct 2022 07:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230032AbiJRLMw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 07:12:52 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ACBBB5FFC; Tue, 18 Oct 2022 04:12:47 -0700 (PDT) Received: from kwepemi500016.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MsB0x1dRpzmV8Y; Tue, 18 Oct 2022 19:08:01 +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:43 +0800 From: Kemeng Shi <shikemeng@huawei.com> 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> Subject: [PATCH v2 1/3] block: Remove redundant parent blkcg_gp check in check_scale_change Date: Tue, 18 Oct 2022 19:12:38 +0800 Message-ID: <20221018111240.22612-2-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 Content-Type: text/plain 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747023883870755253?= X-GMAIL-MSGID: =?utf-8?q?1747023883870755253?= |
Series |
A few cleanup patches for blk-iolatency.c
|
|
Commit Message
Kemeng Shi
Oct. 18, 2022, 11:12 a.m. UTC
Function blkcg_iolatency_throttle will make sure blkg->parent is not NULL before calls check_scale_change. And function check_scale_change is only called in blkcg_iolatency_throttle. Signed-off-by: Kemeng Shi <shikemeng@huawei.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> --- block/blk-iolatency.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index 571fa95aafe9..b24d7b788ba3 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -403,9 +403,6 @@ static void check_scale_change(struct iolatency_grp *iolat) u64 scale_lat; int direction = 0; - if (lat_to_blkg(iolat)->parent == NULL) - return; - parent = blkg_to_lat(lat_to_blkg(iolat)->parent); if (!parent) return;