Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp627508rwb; Thu, 22 Sep 2022 04:35:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4wSzxS+3QHYUCfdhtcFpEyxytruTyCb+yc7vUWiA8+43fthA7HOp6qWiyg3gRadfKa4Aiq X-Received: by 2002:a05:6402:5209:b0:451:2b4e:6e30 with SMTP id s9-20020a056402520900b004512b4e6e30mr2900211edd.380.1663846555309; Thu, 22 Sep 2022 04:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663846555; cv=none; d=google.com; s=arc-20160816; b=xksxZX/HnSSjbzn1fRh5z8sGPL11LrPBqUVsawXOkU0U6FmBZkGtho+9sBzn1enkRn Uq/PPPxVoAd7dAH1viwHeMEldy2b0xRFdiKhB3fNZaq22WpuRkZDAy1U41sv7gTRclH9 53lCslNzqQaW/M1HFUBkZirN+O5PjJ6O4EmyyWCDOKfm3Kq8oZjYAzUDfhpQx9q9JBG3 cTJrcGrctlfkt8upgIV7lvDR4P9xH4pEFOjJQk9oSmBY7f0dMwZNqDN6HTA8Y4bR6nyc ICOaVk/BiOSAlXcLKqh/gV/31bXIZRRteRI5tcJqTSK+VZ3jcrOWkjZl+dApeyuIPTZ7 AhlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SghWSuN0iuIUULz8hyTXqqlFMyeQhHlGuiH6rLXsxzI=; b=XPgkPHPCiWK/T6g6H6jCrWxh5Emz1dfwDQl0dXZT8ie0FQ/8zeIh6WGvCrdqn3MfkZ xDAok7VRPCxTNZbkyOucPz9zofY7HQCJSgGjLI9LGHGkD4pkrsj+VePIaOrCJugsPWQh +roknB2HsoPuWGSMmfOXHxgqr7feKQ8SqLfUIIh/zCfwZvCIkAgDPjQD2ra8X9X5kKmG 5198ZUR+Khq4AU9ySOGn73rbzPE0irMLQFvDFXdlXjm5bTindM7mogbdKCpaUx39H/mu dHdDnEzDqgBSMTkRFhxFUXv9SNBH+LqxColfYLN7YoQ1TZbHjAmV8LSA7kz4Ft36rBXr odrQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i14-20020a1709064fce00b0073c0a523ddcsi5336358ejw.405.2022.09.22.04.35.27; Thu, 22 Sep 2022 04:35:55 -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 S231555AbiIVLZY (ORCPT + 99 others); Thu, 22 Sep 2022 07:25:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231492AbiIVLZQ (ORCPT ); Thu, 22 Sep 2022 07:25:16 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79B81A8322; Thu, 22 Sep 2022 04:25:15 -0700 (PDT) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MYCYW5MzYzpVL9; Thu, 22 Sep 2022 19:22:23 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 19:25:13 +0800 Received: from huawei.com (10.175.127.227) by kwepemm600009.china.huawei.com (7.193.23.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 19:25:12 +0800 From: Yu Kuai To: , , CC: , , , , Subject: [PATCH v3 3/5] block, bfq: don't disable wbt if CONFIG_BFQ_GROUP_IOSCHED is disabled Date: Thu, 22 Sep 2022 19:35:56 +0800 Message-ID: <20220922113558.1085314-4-yukuai3@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220922113558.1085314-1-yukuai3@huawei.com> References: <20220922113558.1085314-1-yukuai3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600009.china.huawei.com (7.193.23.164) 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 wbt and bfq should work just fine if CONFIG_BFQ_GROUP_IOSCHED is disabled. Signed-off-by: Yu Kuai --- block/bfq-iosched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 7ea427817f7f..fec52968fe07 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -7037,6 +7037,7 @@ static void bfq_exit_queue(struct elevator_queue *e) #ifdef CONFIG_BFQ_GROUP_IOSCHED blkcg_deactivate_policy(bfqd->queue, &blkcg_policy_bfq); + wbt_enable_default(bfqd->queue); #else spin_lock_irq(&bfqd->lock); bfq_put_async_queues(bfqd, bfqd->root_group); @@ -7045,7 +7046,6 @@ static void bfq_exit_queue(struct elevator_queue *e) #endif blk_stat_disable_accounting(bfqd->queue); - wbt_enable_default(bfqd->queue); kfree(bfqd); } @@ -7190,7 +7190,9 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) /* We dispatch from request queue wide instead of hw queue */ blk_queue_flag_set(QUEUE_FLAG_SQ_SCHED, q); +#ifdef CONFIG_BFQ_GROUP_IOSCHED wbt_disable_default(q); +#endif blk_stat_enable_accounting(q); return 0; -- 2.31.1