From patchwork Tue Oct 18 11:12:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 4094 Return-Path: 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 + 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 ); 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 To: , , CC: , , , 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 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?1747023883870755253?= X-GMAIL-MSGID: =?utf-8?q?1747023883870755253?= 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 Reviewed-by: Josef Bacik --- 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; 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) { From patchwork Tue Oct 18 11:12:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 4095 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1899017wrs; Tue, 18 Oct 2022 04:16:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7flZtxMjHkLbIoXK0oJ1L6lpB4zA5xdFAdukJ/khJASq0X4VsGyJDAuobLhbYSgUnFjrFH X-Received: by 2002:a17:90b:4a51:b0:20d:4ded:3c26 with SMTP id lb17-20020a17090b4a5100b0020d4ded3c26mr38232177pjb.23.1666091819044; Tue, 18 Oct 2022 04:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666091819; cv=none; d=google.com; s=arc-20160816; b=qupZmKFDhoj9CzB9STeujoaB78COghbFLq4PdqydFw7c13Gz15JBzoPBOfKOETGS6W yhd1oUzTIbUd3JuZF87Vuhxt0CWeCC4bGycwxS4JDIhKsTKJb9jGlxU+vEUYUo0ED6rh PPSaYJLJu7nCQgvETddwstZpbCBgvCW2+93teD3b6zfpb6ukQwK+BUVHBMDF9wXdiU+u IJGfjRHo5PQskmDlAs18UWokclY4bTJRNIQGB6jARsxopGg4nCVPftb2cJW8Apn3pRee 1BYw46in0wwNTXbhjrQ82ZvyBqi8jVDTdmjm3p3+FdkhfgHTzoSfnFltEmdae1P7tL3W YoWA== 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=abD+uPXw9HYXOwtOUa3qrkicQio41Sr08q0mSdviwvw=; b=QtoLWdd30FhhxRZIZm+qzBz1lfHtZtrJifH5r0pmf8thZcy/NxMVYdGcG1j6peNu7X FMENKg0f47VagXkrG+l9onoVdb389N7CRR8KR/+PD5tPL0peUOeiA437TnrOQP844EXX qsbYO8YT+Q6o7AEGKEZ6cAI8yci/iaTZGchv9elADwvus6OAF9Znlyxiq06FkNYiOkZS ZvEeY2jRIphssTPg/McesMDwBR0R2PnxQqUM0UfE0xSQXs4XzicNTVf3NOUfll2x2SoE QddWNCwzQnPXrU4xvrMkT6XKchF79YWNRpW9HpvkH5n1FM+7dIwbmAmXXrMIUFCiUPH6 iTRQ== 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 t8-20020a1709027fc800b0017f7fb8f43csi14271781plb.458.2022.10.18.04.16.46; Tue, 18 Oct 2022 04:16:59 -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 S230037AbiJRLM5 (ORCPT + 99 others); Tue, 18 Oct 2022 07:12:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230025AbiJRLMw (ORCPT ); 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 94C2BB603B; Tue, 18 Oct 2022 04:12:47 -0700 (PDT) Received: from kwepemi500016.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MsB0y442jzmV9L; Tue, 18 Oct 2022 19:08:02 +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 3/3] block: Replace struct rq_depth with unsigned int in struct iolatency_grp Date: Tue, 18 Oct 2022 19:12:40 +0800 Message-ID: <20221018111240.22612-4-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?1747023895436641758?= X-GMAIL-MSGID: =?utf-8?q?1747023895436641758?= We only need a max queue depth for every iolatency to limit the inflight io number. Replace struct rq_depth with unsigned int to simplfy "struct iolatency_grp" and save memory. Signed-off-by: Kemeng Shi Reviewed-by: Josef Bacik --- block/blk-iolatency.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index 2c574f98c8d1..778a0057193e 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -141,7 +141,7 @@ struct iolatency_grp { struct latency_stat __percpu *stats; struct latency_stat cur_stat; struct blk_iolatency *blkiolat; - struct rq_depth rq_depth; + unsigned int max_depth; struct rq_wait rq_wait; atomic64_t window_start; atomic_t scale_cookie; @@ -280,7 +280,7 @@ static void iolat_cleanup_cb(struct rq_wait *rqw, void *private_data) static bool iolat_acquire_inflight(struct rq_wait *rqw, void *private_data) { struct iolatency_grp *iolat = private_data; - return rq_wait_inc_below(rqw, iolat->rq_depth.max_depth); + return rq_wait_inc_below(rqw, iolat->max_depth); } static void __blkcg_iolatency_throttle(struct rq_qos *rqos, @@ -374,7 +374,7 @@ static void scale_change(struct iolatency_grp *iolat, bool up) { unsigned long qd = iolat->blkiolat->rqos.q->nr_requests; unsigned long scale = scale_amount(qd, up); - unsigned long old = iolat->rq_depth.max_depth; + unsigned long old = iolat->max_depth; if (old > qd) old = qd; @@ -386,12 +386,12 @@ static void scale_change(struct iolatency_grp *iolat, bool up) if (old < qd) { old += scale; old = min(old, qd); - iolat->rq_depth.max_depth = old; + iolat->max_depth = old; wake_up_all(&iolat->rq_wait.wait); } } else { old >>= 1; - iolat->rq_depth.max_depth = max(old, 1UL); + iolat->max_depth = max(old, 1UL); } } @@ -444,7 +444,7 @@ static void check_scale_change(struct iolatency_grp *iolat) } /* We're as low as we can go. */ - if (iolat->rq_depth.max_depth == 1 && direction < 0) { + if (iolat->max_depth == 1 && direction < 0) { blkcg_use_delay(lat_to_blkg(iolat)); return; } @@ -452,7 +452,7 @@ static void check_scale_change(struct iolatency_grp *iolat) /* We're back to the default cookie, unthrottle all the things. */ if (cur_cookie == DEFAULT_SCALE_COOKIE) { blkcg_clear_delay(lat_to_blkg(iolat)); - iolat->rq_depth.max_depth = UINT_MAX; + iolat->max_depth = UINT_MAX; wake_up_all(&iolat->rq_wait.wait); return; } @@ -507,7 +507,7 @@ static void iolatency_record_time(struct iolatency_grp *iolat, * We don't want to count issue_as_root bio's in the cgroups latency * statistics as it could skew the numbers downwards. */ - if (unlikely(issue_as_root && iolat->rq_depth.max_depth != UINT_MAX)) { + if (unlikely(issue_as_root && iolat->max_depth != UINT_MAX)) { u64 sub = iolat->min_lat_nsec; if (req_time < sub) blkcg_add_delay(lat_to_blkg(iolat), now, sub - req_time); @@ -919,7 +919,7 @@ static void iolatency_ssd_stat(struct iolatency_grp *iolat, struct seq_file *s) } preempt_enable(); - if (iolat->rq_depth.max_depth == UINT_MAX) + if (iolat->max_depth == UINT_MAX) seq_printf(s, " missed=%llu total=%llu depth=max", (unsigned long long)stat.ps.missed, (unsigned long long)stat.ps.total); @@ -927,7 +927,7 @@ static void iolatency_ssd_stat(struct iolatency_grp *iolat, struct seq_file *s) seq_printf(s, " missed=%llu total=%llu depth=%u", (unsigned long long)stat.ps.missed, (unsigned long long)stat.ps.total, - iolat->rq_depth.max_depth); + iolat->max_depth); } static void iolatency_pd_stat(struct blkg_policy_data *pd, struct seq_file *s) @@ -944,12 +944,12 @@ static void iolatency_pd_stat(struct blkg_policy_data *pd, struct seq_file *s) avg_lat = div64_u64(iolat->lat_avg, NSEC_PER_USEC); cur_win = div64_u64(iolat->cur_win_nsec, NSEC_PER_MSEC); - if (iolat->rq_depth.max_depth == UINT_MAX) + if (iolat->max_depth == UINT_MAX) seq_printf(s, " depth=max avg_lat=%llu win=%llu", avg_lat, cur_win); else seq_printf(s, " depth=%u avg_lat=%llu win=%llu", - iolat->rq_depth.max_depth, avg_lat, cur_win); + iolat->max_depth, avg_lat, cur_win); } static struct blkg_policy_data *iolatency_pd_alloc(gfp_t gfp, @@ -993,9 +993,7 @@ static void iolatency_pd_init(struct blkg_policy_data *pd) latency_stat_init(iolat, &iolat->cur_stat); rq_wait_init(&iolat->rq_wait); spin_lock_init(&iolat->child_lat.lock); - iolat->rq_depth.queue_depth = blkg->q->nr_requests; - iolat->rq_depth.max_depth = UINT_MAX; - iolat->rq_depth.default_depth = iolat->rq_depth.queue_depth; + iolat->max_depth = UINT_MAX; iolat->blkiolat = blkiolat; iolat->cur_win_nsec = 100 * NSEC_PER_MSEC; atomic64_set(&iolat->window_start, now);