Message ID | 20221101093417.10540-13-shikemeng@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2846185wru; Tue, 1 Nov 2022 02:37:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM62YsESaWyyr527hZ1ApmQ1QN+LpnuTfTp5tdXslxZST5Ob38gwzg5qkPJ607isvZMd+nC6 X-Received: by 2002:a17:90a:71ca:b0:213:c03a:1b07 with SMTP id m10-20020a17090a71ca00b00213c03a1b07mr15278734pjs.67.1667295451253; Tue, 01 Nov 2022 02:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667295451; cv=none; d=google.com; s=arc-20160816; b=m2mBIJ0slZl9mJO13TXxCPBAUx/9XnRg9/WMsf9ZT5QblPpG4aZJkXi/3t+2VvSxEL Sv0eLgaTTzlxPPAwG0y/R1W3jpjD+4ER893f5aKeUsXx4clhzSWqAFEZzZ5YqP8Q65Tz ahf+howZTZekuu9JEsBiCPMFGhhD7Eh1lwb250zMgK011RnGvzeR7R9/aqBjhS2w1BcG a24zH3jS9rGSxORREMgOl+dmRieTqKSCq+JsqtRFEYRfAibn4GxwNQBZFA0boHl7ygRL FYNxW4oCiweegc8BpQAIAMCI3FANjMxrMpMWaoYGWtw1a4ZckwO3E9VodaIkvqh7QtmG Ls6w== 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=DfwUEjqPXJAHi9LhQuHjy3/4likQXFxHZFTiK1p65M8=; b=axLK+r/WXTgprQPo89lH0yyR7fdGso3n/+5Cmcoh1M2fRO0gFmq5cORDJ8E21Q+2AX lVNxDfq/bOtO/30+lkBjdZLSuNAMukjLkNTAvH4cwOfBoj3wB/hnR1WvSUQCOzhOcxOs A1FCTVv140Jn9zgqAvm+teBHBYdhln22Zw5xmweTgGzd/NuPuOd50kveUAl7ezp5yuNR iDcwI/0DL8IO2X1/2txEdhcTVsG4utHz1dyjqBg03kyCG8W8Pp3OdQ5R56cfvRXujfBT tk8Qmjs+omycQ8ZWVA1L8RCJcrIVbFBn2rZNp6NmYL/XlmjPx8oIfYQaIriVtBYRPKH7 LN6Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020a170902d2c600b00186e21234f2si13282620plc.177.2022.11.01.02.37.16; Tue, 01 Nov 2022 02:37:31 -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 S230307AbiKAJfU (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 1 Nov 2022 05:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbiKAJei (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Nov 2022 05:34:38 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2454F1901B; Tue, 1 Nov 2022 02:34:30 -0700 (PDT) Received: from kwepemi500016.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4N1lCB3wcMzJnM3; Tue, 1 Nov 2022 17:31:34 +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:26 +0800 From: Kemeng Shi <shikemeng@huawei.com> To: <paolo.valente@linaro.org>, <axboe@kernel.dk> CC: <linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <shikemeng@huawei.com> Subject: [PATCH 12/20] block, bfq: start/restart service_from_wr accumulating correctly Date: Tue, 1 Nov 2022 17:34:09 +0800 Message-ID: <20221101093417.10540-13-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748285995402770836?= X-GMAIL-MSGID: =?utf-8?q?1748285995402770836?= |
Series |
A few bugfix and cleanup patches for bfq-iosched
|
|
Commit Message
Kemeng Shi
Nov. 1, 2022, 9:34 a.m. UTC
1. Start accumulating service_from_wr when async queues are weight raised.
The service_from_wr for async queues is accumulated and checked to finish
weight-raise as sync queues. We need to charge service_from_wr for async
queues about to weight-raise.
2. Restart accumulating service_from_wr when queues are deemed interactive
again The weight-raising period is restarted when queues are deemed
interactive again in bfq_add_request. It's more reasonable to restart
service_from_wr accumulating too.
Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
---
block/bfq-iosched.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 261ba2d63925..a46e49de895a 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -1726,6 +1726,7 @@ static void bfq_update_bfqq_wr_on_rq_arrival(struct bfq_data *bfqd, 2 * bfq_min_budget(bfqd)); } else if (old_wr_coeff > 1) { if (interactive) { /* update wr coeff and duration */ + bfqq->service_from_wr = 0; bfqq->wr_coeff = bfqd->bfq_wr_coeff; bfqq->wr_cur_max_time = bfq_wr_duration(bfqd); } else if (in_burst) @@ -2311,6 +2312,7 @@ static void bfq_add_request(struct request *rq) time_is_before_jiffies( bfqq->last_wr_start_finish + bfqd->bfq_wr_min_inter_arr_async)) { + bfqq->service_from_wr = 0; bfqq->wr_coeff = bfqd->bfq_wr_coeff; bfqq->wr_cur_max_time = bfq_wr_duration(bfqd);