Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2017424rwi; Tue, 1 Nov 2022 02:49:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7t8e+c56e36xSHMuCpCdzIL1r6wdJ93T/ejv+A1+1CVjxoq+X3+nyomOa9ugwm9ZoPtwOx X-Received: by 2002:a17:903:32ce:b0:187:143f:4c4d with SMTP id i14-20020a17090332ce00b00187143f4c4dmr13770425plr.135.1667296177007; Tue, 01 Nov 2022 02:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667296177; cv=none; d=google.com; s=arc-20160816; b=virfpOxW/1xfYJ1Xj8HVQi9t/IWpP8juCNw9NF+ZY9kLqKl1l0/vbMt01hh7Sj74jE BgRdyg3Y+ytmCROcf04tXHnhZPMKDGrVQZIxfR2UhRNqPclubUtWbPUZJb4vPty5Zy0N yiDizqVXqwfDubxnsH+Ubktnr730Z4iOs76TZQjO8pJpi18Fq0qL6eijE9LMBNJSxp3z 5pTKUg35LIzVtjPnD/icmVc3oz/xhstejqPPFr761yT/qohdzj7mQwy/4LqcNOYo6wiy Yj99cr3stHvFxHoBDOkQlDipEdNw+fpcsNfO/eBidf0tE1PXgTk6hjNnO1IyZ1Jj18tx aa9A== 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=P/36bzO8WObcj+ZSRbkHDjsgQ2Weyo6AyzG1xWKCnR4=; b=Fw7gU6hBquVQBIR1sQWG4CWanIznSbhDNIkS3GYJrlnSBiTeQ/i/oJulzHg6pGrGS6 hTyBY/bMGa8wgk1aNhnntn2aX+N5HqPRIBkboKK0OfxDs4qZ9OlMMlVNI96/1U361x45 AO0dpA7LuGoOTT/jZ1sB7yH8w7mpwDDQgOpXEIeHWyZwEzZMOjkiHubPUST0V6ZficS5 4fS6E02b7jGQFdiUbo2kpz/d2Uc+/PkVSAPNoxPfHjEfw9OKVjdD4VhvLkl6xiDu9Ejc ymNx3yIo7aQCoDCs00j9n9GcZDRtuThjP2eLvERXuVVV4Fq4U6HBKG9b12cvGf5jNM/D LiEA== 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 d11-20020a170902cecb00b00176e226934dsi11788102plg.367.2022.11.01.02.49.23; Tue, 01 Nov 2022 02:49:36 -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 S230254AbiKAJe5 (ORCPT + 97 others); Tue, 1 Nov 2022 05:34:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230164AbiKAJe2 (ORCPT ); Tue, 1 Nov 2022 05:34:28 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B054918E2C; Tue, 1 Nov 2022 02:34:26 -0700 (PDT) Received: from kwepemi500016.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4N1lG70LybzHvXl; Tue, 1 Nov 2022 17:34:07 +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, 1 Nov 2022 17:34:24 +0800 From: Kemeng Shi To: , CC: , , Subject: [PATCH 08/20] block, bfq: do srt filtering for interactive queues in bfq_completed_request Date: Tue, 1 Nov 2022 17:34:05 +0800 Message-ID: <20221101093417.10540-9-shikemeng@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20221101093417.10540-1-shikemeng@huawei.com> References: <20221101093417.10540-1-shikemeng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.178.129] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 Commit 20cd32450bcbec ("block, bfq: do not consider interactive queues in srt filtering") remove the updating of soft_rt_next_start for bfq_queues in interactive weight raising. Commit 3c337690d2ebb7 ("block, bfq: avoid spurious switches to soft_rt of interactive queues") try to revert the first commit to add back updating of soft_rt_next_start for bfq_queues in interactive weight raising and fix original problem by reset consumed bandwidth if a bfq_queue switches from interactive to normal mode. The problem this patch fixes is that first commit is not fully reverted as updating of soft_rt_next_start for bfq_queues in interactive weight raising is still removed in bfq_completed_request. Fix this by updating soft_rt_next_start for bfq_queues in interactive weight raising in bfq_completed_request. Signed-off-by: Kemeng Shi --- block/bfq-iosched.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 15e7d6c6fa83..fa96cbca7814 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -6317,14 +6317,11 @@ static void bfq_completed_request(struct bfq_queue *bfqq, struct bfq_data *bfqd) * isochronous, and both requisites for this condition to hold * are now satisfied, then compute soft_rt_next_start (see the * comments on the function bfq_bfqq_softrt_next_start()). We - * do not compute soft_rt_next_start if bfqq is in interactive - * weight raising (see the comments in bfq_bfqq_expire() for - * an explanation). We schedule this delayed update when bfqq - * expires, if it still has in-flight requests. + * schedule this delayed update when bfqq expires, if it still + * has in-flight requests. */ if (bfq_bfqq_softrt_update(bfqq) && bfqq->dispatched == 0 && - RB_EMPTY_ROOT(&bfqq->sort_list) && - bfqq->wr_coeff != bfqd->bfq_wr_coeff) + RB_EMPTY_ROOT(&bfqq->sort_list)) bfqq->soft_rt_next_start = bfq_bfqq_softrt_next_start(bfqd, bfqq); -- 2.30.0