Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp199599iob; Wed, 27 Apr 2022 23:50:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZY4RsveXmNCek0a29+or+1r4prsq4G3rR1V3/3rkEfCiwH9ct2vVOtffjqUfiu99MMb2a X-Received: by 2002:a17:902:6bc9:b0:158:a0d3:d080 with SMTP id m9-20020a1709026bc900b00158a0d3d080mr32884253plt.24.1651128616650; Wed, 27 Apr 2022 23:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651128616; cv=none; d=google.com; s=arc-20160816; b=UtLtV9PgXc0B0nQhjA/6SnZlJgsKtTGawn5MyvOpPKI7L4KBrB0sbqT9DFVTbq4heQ ss/2WuaU4mTEioFWOvM4twX8QIHE8vN6U33SOplvuIfb0HwLw5vP+R4jSPpzXAgc/DVz N8lL9yUajq4RLB600WD6pnV/mN8yax/yEZ2daWt7T3Y/8lgiwDpoBYM6pIp+6+mbdrou NR5Et0wwtmeR/QBaul+gelALDtHFt4g9hPnhUl7q+qw68zCTyd4a7NuNRjwBBoCPtAfx FS2hPJAD5ycWV02LNFNFNQP4m+FrhuB0tXKOutVGN+6lGj9QCu2z0UdQ4JGfOEyLs9l3 9nqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=qtJIHFApICpBdrM8WJeSJ58tksKq4pJKF89up4izyo8=; b=t3DtoPhaJpdZVwLyf/Bhl/aNXw+Yc8pfb/k0J9iKeqG8qijzZgAje3HIuUk4i5Bh4v AR5PlihJ5x+UtV9Kermjltr5ztB22JrFyTGa8gOP5wZt7kO+HvEs9cOlkYo1G0wZ+WLp nhhFU6qTo0UQ3ZP/YwE18W44jZ1NQSMDVXhEJSZKXNzTIF3Cxpi381toloKK6JD7zJRw jNWaEkWMJarklgD/6tJpVRGKjz8Om2nqTxblp/gQ2KekMuQQHjClHGA++9peQcKW/O33 F7HH1k75VcaNgeDeMUcbiwWvNviY3vkNI6ztjf9P5g9bDlUgDmciSfuknUx3ly0u0p4O 8XGA== 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 a19-20020a1709027d9300b00158c30f7edasi3781182plm.137.2022.04.27.23.50.02; Wed, 27 Apr 2022 23:50:16 -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 S232037AbiD1BMz (ORCPT + 99 others); Wed, 27 Apr 2022 21:12:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240191AbiD1BMw (ORCPT ); Wed, 27 Apr 2022 21: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 C6C40728DA; Wed, 27 Apr 2022 18:09:39 -0700 (PDT) Received: from kwepemi500011.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KpcvG4fm7zfb9q; Thu, 28 Apr 2022 09:08:42 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by kwepemi500011.china.huawei.com (7.221.188.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 28 Apr 2022 09:09:37 +0800 Received: from [10.174.176.73] (10.174.176.73) 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; Thu, 28 Apr 2022 09:09:36 +0800 Subject: Re: [PATCH -next v3 2/3] block, bfq: refactor the counting of 'num_groups_with_pending_reqs' To: Jan Kara CC: , , , , , , References: <20220427124722.48465-1-yukuai3@huawei.com> <20220427124722.48465-3-yukuai3@huawei.com> <20220427124908.o3cl72h2uflmufso@quack3.lan> From: "yukuai (C)" Message-ID: Date: Thu, 28 Apr 2022 09:09:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20220427124908.o3cl72h2uflmufso@quack3.lan> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.176.73] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 ?? 2022/04/27 20:49, Jan Kara ะด??: > On Wed 27-04-22 20:47:21, Yu Kuai wrote: >> Currently, bfq can't handle sync io concurrently as long as they >> are not issued from root group. This is because >> 'bfqd->num_groups_with_pending_reqs > 0' is always true in >> bfq_asymmetric_scenario(). >> >> The way that bfqg is counted into 'num_groups_with_pending_reqs': >> >> Before this patch: >> 1) root group will never be counted. >> 2) Count if bfqg or it's child bfqgs have pending requests. >> 3) Don't count if bfqg and it's child bfqgs complete all the requests. >> >> After this patch: >> 1) root group is counted. >> 2) Count if bfqg have at least one bfqq that is marked busy. >> 3) Don't count if bfqg doesn't have any busy bfqqs. >> >> With this change, the occasion that only one group is activated can be >> detected, and next patch will support concurrent sync io in the >> occasion. >> >> This patch also rename 'num_groups_with_pending_reqs' to >> 'num_groups_with_busy_queues'. >> >> Signed-off-by: Yu Kuai > > Looks good. Just I think you forgot to remove in_groups_with_pending_reqs, > which is now unused, from bfq_entity. Will remove it in the next iteration. Thanks, Kuai