Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1867534pxb; Sun, 17 Apr 2022 01:36:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMSE5bsly0RMdBm1egHig80i7S8vMFgbkMhpwmS5EKqCjr9WXwhJ71dbY+gW4uab2FHzGQ X-Received: by 2002:a05:6a00:2292:b0:50a:6683:44a5 with SMTP id f18-20020a056a00229200b0050a668344a5mr2061016pfe.16.1650184560861; Sun, 17 Apr 2022 01:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650184560; cv=none; d=google.com; s=arc-20160816; b=GY34Voq5W0L8q53B0M0/WKI2f7BVgKon05/1ncLcScjhVYtzKsxVslAR6yk/i6ZcqW HyPKZRban132OiVlVVev+394AOYQUm/qmaOjG6RE72XCMYgrGnFo3XDiQeE4DyzQDaNT pUjgXITPWls1LFtpER2kpcwSktjJULr+tCenlpinomIQ1jOFo0M1CiX40XcC/PYTRsBd 7swuW+oFd4Jfnywr3qEcNTrS6wD8NMG6AX7npIe4ZWPKyICe20LmZv38Tocl1Vdnf6/n vdX7UNVLfsfK7/hczYOKmkIJaWRDhz4ICDNBbym2mTZjDNObJkQ8FZC4Nb46XV7tihi5 pI1w== 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=O0Irr9b9V5jySbZQnPfPhar6UQgmNYKhyYcFdNDGBDA=; b=YbeO9NzdRKBquPvCxo0+jqaxkWs6Ekk9Y7K5SHQKuf0l7M+oAahPodhinm7SEuYgl9 5YqoCOJPEpKw4AsajW/3IpDqG0GleLdRxCz65lf52iznPnQTfyrocTTcocDUp4nWI5GP NmLU+JWlD9KRMr8RBSSXW5V2Nt/bZj8IVTzeENMtfDN7SpPm8BH7vKGUkfBmDYicnflg s0f50Ls/0UPLCLBF44rX4G6/pg2MTL6PadJfBT/iNMJU8BwYedQJZz4j/MFOvtsY+8fl oGDfKPBqhfgqc9rtpItrXXt6FNyu0l8vkmJrbgXSMdY23wKocWJR04JZP//kTgELYSF6 Y5QA== 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 s18-20020a056a00195200b00505b033e35fsi6215262pfk.71.2022.04.17.01.35.47; Sun, 17 Apr 2022 01:36:00 -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 S231311AbiDPJ0V (ORCPT + 99 others); Sat, 16 Apr 2022 05:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbiDPJ0C (ORCPT ); Sat, 16 Apr 2022 05:26:02 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8031C1171; Sat, 16 Apr 2022 02:23:31 -0700 (PDT) Received: from kwepemi100017.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KgSLh57KQzCr6c; Sat, 16 Apr 2022 17:19:08 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by kwepemi100017.china.huawei.com (7.221.188.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 16 Apr 2022 17:23:29 +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.24; Sat, 16 Apr 2022 17:23:28 +0800 From: Yu Kuai To: , , , CC: , , , , Subject: [PATCH -next v2 5/5] block, bfq: do not idle if only one cgroup is activated Date: Sat, 16 Apr 2022 17:37:53 +0800 Message-ID: <20220416093753.3054696-6-yukuai3@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220416093753.3054696-1-yukuai3@huawei.com> References: <20220416093753.3054696-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, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Now that root group is counted into 'num_groups_with_pending_reqs', 'num_groups_with_pending_reqs > 0' is always true in bfq_asymmetric_scenario(). Thus change the condition to 'num_groups_with_pending_reqs > 1'. On the other hand, now that 'num_groups_with_pending_reqs' represents how many groups have pending requests, this change can enable concurrent sync io is only on cgroup is activated. Signed-off-by: Yu Kuai --- block/bfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 39abcd95df8e..7d9f94882f8e 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -846,7 +846,7 @@ static bool bfq_asymmetric_scenario(struct bfq_data *bfqd, return varied_queue_weights || multiple_classes_busy #ifdef CONFIG_BFQ_GROUP_IOSCHED - || bfqd->num_groups_with_pending_reqs > 0 + || bfqd->num_groups_with_pending_reqs > 1 #endif ; } -- 2.31.1