Message ID | 20230219104309.1511562-2-shikemeng@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp656338wrn; Sat, 18 Feb 2023 18:43:11 -0800 (PST) X-Google-Smtp-Source: AK7set/kGI5uezFNAlNHqRhvUHhw6J2v2Wns5Pay9nyBPI/ebmCUlgsjV+QCNpsQ5Xnvl46naq6G X-Received: by 2002:a17:902:dac6:b0:19a:9055:6658 with SMTP id q6-20020a170902dac600b0019a90556658mr2013419plx.18.1676774591012; Sat, 18 Feb 2023 18:43:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676774590; cv=none; d=google.com; s=arc-20160816; b=gYEBkfnbWTsn8Thm6b8ue5Ur6tEvl21Y3YRCrSLoo8j8Wzj4D3kZ97mYXVc/Ms9l1Q j+3S/65InUYn91V/3qxcmIjAwpPw7NkQrEwc0R8Eat3PcDNaErvkjgIxHf4qKpIhXXEN i94LEOUxNWV/Jyb0PWx9b9bxTj+ewKkbredWt6OiBMAODjAYG6ICw4VWLb/Q2jrTag1e jezS7FPBo/zh+rfvZ3C6ROKwKNgq5MA4Xsc6oG+WBQRHMGTKBicRUMux1cmRdlVzoocJ DNRdVWzerEHDd5Bpf1960gVM7Y3o/EPw6kh7IfyRuiUtrlsgViVhYeshb42WIpWclBtz RmkQ== 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=/Dl81Or8XSvLPHtAQacI2mZ//xzxqYXq/756N95rS8g=; b=s6iCqVZeIC94kyFCuBkkIeFhoBdL4U1X7GmD0+nOkkHEqGWIHI+A5d39nxVztRLa21 8mq+5EDDoN2S2FIePzr2lJAWh0KGla4i1BkHcJ1YwfEOPpz2i1hycuVWKOxUIJ5+csk3 QA1mJT9MkQsO7KwJ9Gy2vjhHbVM+MwWbL2cwMatP+AXw/uvgb5M95wxsaCdYlvvD4kJ8 6aeTowag5k5XfJBABlO9KSE4e6r6u6L8/vlKndo+cU9i/tjlnxBhARKJBiYJZ2ANEpRW 5MDRlodCrSM+VUnDzqtCup9Plcr3OVLqHgLl6MFC2pc1eK2mE0TJEYLOM76c81w280+d BOVw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a633752000000b00491ad1ca2f2si10141237pgn.835.2023.02.18.18.42.58; Sat, 18 Feb 2023 18:43:10 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229723AbjBSCln (ORCPT <rfc822;nanshango2@gmail.com> + 99 others); Sat, 18 Feb 2023 21:41:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbjBSCl2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 18 Feb 2023 21:41:28 -0500 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33E6311EB2; Sat, 18 Feb 2023 18:41:26 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4PK8v42lPhz4f3mLg; Sun, 19 Feb 2023 10:41:20 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgBH7utQjPFjPmleDw--.7604S3; Sun, 19 Feb 2023 10:41:22 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: paolo.valente@linaro.org, axboe@kernel.dk, jack@suse.cz Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH 01/17] block, bfq: properly mark bfqq remained idle Date: Sun, 19 Feb 2023 18:42:53 +0800 Message-Id: <20230219104309.1511562-2-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230219104309.1511562-1-shikemeng@huaweicloud.com> References: <20230219104309.1511562-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgBH7utQjPFjPmleDw--.7604S3 X-Coremail-Antispam: 1UD129KBjvJXoW7Ww48Kr1xtrWrKF4kAFy7KFg_yoW8GrWUpa srGr4vqryrKrWrtF48Wa1rXF18K3s7Gr17XF15uw4UZ3yjqFn7tFsayw4FqryFvrWIkwsx ZwnrWr9xWr90kw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBE14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_Jr4l82xGYIkIc2x26xkF7I0E14v26r1I6r4UM28lY4IEw2IIxxk0rwA2 F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjx v20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2 z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErc IFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v2 6r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2 Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_ Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMI IF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pR3PE3UUUUU = X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, SPF_HELO_NONE,SPF_NONE 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?1758225593834812474?= X-GMAIL-MSGID: =?utf-8?q?1758225593834812474?= |
Series |
Some bugfix and cleanup patches for bfq
|
|
Commit Message
Kemeng Shi
Feb. 19, 2023, 10:42 a.m. UTC
Bfqq activation will try to recover the "service hole" of bfqq which may
issues requests greedily while remained idle for other reasons: CPU high
load, bfqq not enjoying idling, I/O throttling somewhere in the path from
the process to the I/O scheduler. So we should mark bfqq remained idle
when expired for two reasons: BFQQE_NO_MORE_REQUESTS or BFQQE_TOO_IDLE.
More details can be found in comment of
bfq_bfqq_update_budg_for_activation.
So we should mark bfqq remained idle expired for BFQQE_NO_MORE_REQUESTS
or BFQQE_TOO_IDLE instead of (reason != BFQQE_BUDGET_TIMEOUT &&
reason != BFQQE_BUDGET_EXHAUSTED).
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
block/bfq-iosched.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 777dcab73c8e..3f5c740664ce 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -4420,8 +4420,8 @@ void bfq_bfqq_expire(struct bfq_data *bfqd, /* mark bfqq as waiting a request only if a bic still points to it */ if (!bfq_bfqq_busy(bfqq) && - reason != BFQQE_BUDGET_TIMEOUT && - reason != BFQQE_BUDGET_EXHAUSTED) { + reason == BFQQE_NO_MORE_REQUESTS && + reason == BFQQE_TOO_IDLE) { bfq_mark_bfqq_non_blocking_wait_rq(bfqq); /* * Not setting service to 0, because, if the next rq