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 11/20] block, bfq: remove unnecessary "wr" part of wr_or_deserves_wr
Date: Tue, 1 Nov 2022 17:34:08 +0800 [thread overview]
Message-ID: <20221101093417.10540-12-shikemeng@huawei.com> (raw)
In-Reply-To: <20221101093417.10540-1-shikemeng@huawei.com>
Before commit 96a291c38c3299 ("block, bfq: preempt lower-weight or
lower-priority queues"), wr_or_deserves_wr is used to check if
preempt is wanted. Currently, wr_or_deserves_wr is only used in
bfq_update_bfqq_wr_on_rq_arrival to check if weight raising is
needed, so the "wr" part of wr_or_deserves_wr is not needed
anymore. Rename wr_or_deserves_wr to deserves_wr and remove
unnecessary bfqq->wr_coeff > 1 for original wr_or_deserves_wr.
Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
---
block/bfq-iosched.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 0ecb3640d715..261ba2d63925 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -1681,12 +1681,12 @@ static unsigned long bfq_smallest_from_now(void)
static void bfq_update_bfqq_wr_on_rq_arrival(struct bfq_data *bfqd,
struct bfq_queue *bfqq,
unsigned int old_wr_coeff,
- bool wr_or_deserves_wr,
+ bool deserves_wr,
bool interactive,
bool in_burst,
bool soft_rt)
{
- if (old_wr_coeff == 1 && wr_or_deserves_wr) {
+ if (old_wr_coeff == 1 && deserves_wr) {
/* start a weight-raising period */
if (interactive) {
bfqq->service_from_wr = 0;
@@ -1866,7 +1866,7 @@ static void bfq_bfqq_handle_idle_busy_switch(struct bfq_data *bfqd,
bfq_clear_bfqq_just_created(bfqq);
if (bfqd->low_latency) {
- bool soft_rt, in_burst, wr_or_deserves_wr;
+ bool soft_rt, in_burst, deserves_wr;
/*
* bfqq deserves to be weight-raised if:
* - it is sync,
@@ -1905,14 +1905,13 @@ static void bfq_bfqq_handle_idle_busy_switch(struct bfq_data *bfqd,
* processes. So let also stably-merged queued enjoy weight
* raising.
*/
- wr_or_deserves_wr = (bfqq->wr_coeff > 1 ||
- (bfq_bfqq_sync(bfqq) &&
+ deserves_wr = (bfq_bfqq_sync(bfqq) &&
(bfqq->bic || RQ_BIC(rq)->stably_merged) &&
- (*interactive || soft_rt)));
+ (*interactive || soft_rt));
bfq_update_bfqq_wr_on_rq_arrival(bfqd, bfqq,
old_wr_coeff,
- wr_or_deserves_wr,
+ deserves_wr,
*interactive,
in_burst,
soft_rt);
--
2.30.0
next prev parent reply other threads:[~2022-11-01 9:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 9:33 [PATCH 00/20] A few bugfix and cleanup patches for bfq-iosched Kemeng Shi
2022-11-01 9:33 ` [PATCH 01/20] block, bfq: fix typo in comment Kemeng Shi
2022-11-01 9:33 ` [PATCH 02/20] block, bfq: Update bfqd->max_budget with bfqd->lock held Kemeng Shi
2022-11-01 9:34 ` [PATCH 03/20] block, bfq: correct bfq_max_budget and bfq_min_budget Kemeng Shi
2022-11-01 9:34 ` [PATCH 04/20] block, bfq: simpfy computation of bfqd->budgets_assigned Kemeng Shi
2022-11-01 9:34 ` [PATCH 05/20] block, bfq: recover the "service hole" if enough budget is left Kemeng Shi
2022-11-01 9:34 ` [PATCH 06/20] block, bfq: correct interactive weight-raise check in bfq_set_budget_timeout Kemeng Shi
2022-11-01 9:34 ` [PATCH 07/20] block, bfq: simpfy check for interactive bfqq in bfq_update_wr_data Kemeng Shi
2022-11-01 9:34 ` [PATCH 08/20] block, bfq: do srt filtering for interactive queues in bfq_completed_request Kemeng Shi
2022-11-01 9:34 ` [PATCH 09/20] block, bfq: remove redundant check if (bfqq->dispatched > 0) Kemeng Shi
2022-11-01 9:34 ` [PATCH 10/20] block, bfq: define and use soft_rt, in_burst and wr_or_deserves_wr only low_latency is enable Kemeng Shi
2022-11-01 9:34 ` Kemeng Shi [this message]
2022-11-01 9:34 ` [PATCH 12/20] block, bfq: start/restart service_from_wr accumulating correctly Kemeng Shi
2022-11-01 9:34 ` [PATCH 13/20] block,bfq: remove redundant nonrot_with_queueing check in bfq_setup_cooperator Kemeng Shi
2022-11-01 9:34 ` [PATCH 14/20] block, bfq: remove redundant oom_bfqq check for bfqq from bfq_find_close_cooperator Kemeng Shi
2022-11-01 9:34 ` [PATCH 15/20] block, bfq: some cleanups for function bfq_pos_tree_add_move Kemeng Shi
2022-11-01 9:34 ` [PATCH 16/20] block, bfq: remove unnecessary goto tag in __bfq_weights_tree_remove Kemeng Shi
2022-11-01 9:34 ` [PATCH 17/20] block, bfq: remove unnecessary traverse in bfq_add_to_burst Kemeng Shi
2022-11-01 9:34 ` [PATCH 18/20] block, bfq: remove unnecessary bfqq->next_rq = NULL in bfq_remove_request Kemeng Shi
2022-11-01 9:34 ` [PATCH 19/20] block, bfq: remove unnecessary local variable __bfqq in bfq_setup_merge Kemeng Shi
2022-11-01 9:34 ` [PATCH 20/20] block, bfq: remove unncessary process_ref check for merged queue " Kemeng Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221101093417.10540-12-shikemeng@huawei.com \
--to=shikemeng@huawei.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paolo.valente@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®