From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51F85C433F5 for ; Sat, 28 May 2022 08:30:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231719AbiE1Iao (ORCPT ); Sat, 28 May 2022 04:30:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231596AbiE1Iak (ORCPT ); Sat, 28 May 2022 04:30:40 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5798186D4 for ; Sat, 28 May 2022 01:30:36 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id q21so12574585ejm.1 for ; Sat, 28 May 2022 01:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=T+Hu8XQTes5+zOjXdhH2PIcfNeRm97dI8R0g/lN+Yd8=; b=cMsKLp9xx6caXX4fhNUQ1GIDgeMWcvOHB+BQYZV7KhH/sIQHowtAJJduwzZeMn/ayn NEyO4PCwKkMmopMy3OFYPJNGueAYgpi2TmgwoPuj7gr2ImFZupuKBykH5Y0wahgVwpwC UmEXmyzWlGNdEHsP7SHKUDULFII5IHCW2u3onGKGbELBlPMnDfEMv2O4iKAFVh66XNyC 6qUWZxzmeOFsQ2R1foQjeTlNZPR7YXsFJ3WfkLJ7m9blxV0nng9m8EykO4xde1SnExTZ juWKXm2I6HADHKXH0h/Fy0Rt5PA6d7CYbUtH2rOgnt0gFj3U+hJiV1J5T9NCzPzWPn9W kK7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=T+Hu8XQTes5+zOjXdhH2PIcfNeRm97dI8R0g/lN+Yd8=; b=sSbLgenuwodpKHGrF2trXTZLVxI9hw4sZiTRZeDEve7XK5Oka/uYOlLGGDmdflUNP9 DpeJoO2VYDzbVJ8QFKd1YlzyXLErrwGD7Mw/rk7Mbi3tqIAhTOQ46oiWGskxrUNlm9K5 fTlTwBLVZNtMLWEKWo0XZDM0FhS9D9OLgQwESqr2aP7gnExpqJwylghR85/+5Cvj66bg Fq5vhvnmXlBeHYxBcVGa2spnJfQyHKjUJPCaqc7fk3HTGpV/O3pQsQ9OvxlENSlc9OE2 SpMkr+gx7i77Jrnw9Kg+arvy+J1/5YAcSmfFP058EcMSG6VtR5vazpDCSYcCURvCkoP4 FDrA== X-Gm-Message-State: AOAM530EVxtTKSwfJVm9nB6/swinaQrjRlMqfDLL2DuWbdJU0uYMpi78 S/bf8ibSUxgP8CCRybORJkBIUg== X-Google-Smtp-Source: ABdhPJxu4fCXtVWFNHsG9akf0/etbFVKWELdZtJARO0pBh6QDBb5a13+1ZM3FK1wENfvxz8aymxzpQ== X-Received: by 2002:a17:907:7b9d:b0:6f4:df04:affb with SMTP id ne29-20020a1709077b9d00b006f4df04affbmr41383084ejc.473.1653726635386; Sat, 28 May 2022 01:30:35 -0700 (PDT) Received: from mbp-di-paolo.station (net-93-144-98-177.cust.vodafonedsl.it. [93.144.98.177]) by smtp.gmail.com with ESMTPSA id rv3-20020a1709068d0300b006fec69a3978sm2054540ejc.207.2022.05.28.01.30.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 May 2022 01:30:35 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH -next v6 3/3] block, bfq: do not idle if only one group is activated From: Paolo Valente In-Reply-To: <20220523131818.2798712-4-yukuai3@huawei.com> Date: Sat, 28 May 2022 10:30:34 +0200 Cc: Jan Kara , tj@kernel.org, axboe@kernel.dk, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com Content-Transfer-Encoding: quoted-printable Message-Id: <27B0AE8B-C134-4BA1-B84F-39C659CB2B10@linaro.org> References: <20220523131818.2798712-1-yukuai3@huawei.com> <20220523131818.2798712-4-yukuai3@huawei.com> To: Yu Kuai X-Mailer: Apple Mail (2.3445.104.11) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Il giorno 23 mag 2022, alle ore 15:18, Yu Kuai ha = scritto: >=20 > Now that root group is counted into 'num_groups_with_busy_queues', > 'num_groups_with_busy_queues > 0' is always true in > bfq_asymmetric_scenario(). Thus change the condition to '> 1'. >=20 > On the other hand, this change can enable concurrent sync io if only > one group is activated. This is ok. Yet, if the mistakes I found in the other two patches are actual errors, I wonder how these changes made it to pass your tests. Thanks, Paolo >=20 > Signed-off-by: Yu Kuai > Reviewed-by: Jan Kara > --- > block/bfq-iosched.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c > index 609b4e894684..142e1ca4600f 100644 > --- a/block/bfq-iosched.c > +++ b/block/bfq-iosched.c > @@ -812,7 +812,7 @@ bfq_pos_tree_add_move(struct bfq_data *bfqd, = struct bfq_queue *bfqq) > * much easier to maintain the needed state: > * 1) all active queues have the same weight, > * 2) all active queues belong to the same I/O-priority class, > - * 3) there are no active groups. > + * 3) there are one active group at most. > * In particular, the last condition is always true if hierarchical > * support or the cgroups interface are not enabled, thus no state > * needs to be maintained in this case. > @@ -844,7 +844,7 @@ static bool bfq_asymmetric_scenario(struct = bfq_data *bfqd, >=20 > return varied_queue_weights || multiple_classes_busy > #ifdef CONFIG_BFQ_GROUP_IOSCHED > - || bfqd->num_groups_with_busy_queues > 0 > + || bfqd->num_groups_with_busy_queues > 1 > #endif > ; > } > --=20 > 2.31.1 >=20