From: Jan Kara <jack@suse.cz>
To: Yu Kuai <yukuai3@huawei.com>
Cc: jack@suse.cz, paolo.valente@linaro.org, axboe@kernel.dk,
tj@kernel.org, linux-block@vger.kernel.org,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
yi.zhang@huawei.com
Subject: Re: [PATCH -next 5/8] block, bfq: cleanup bfq_activate_requeue_entity()
Date: Thu, 19 May 2022 13:06:01 +0200 [thread overview]
Message-ID: <20220519110601.vols2d4npm4pgvns@quack3.lan> (raw)
In-Reply-To: <20220514090522.1669270-6-yukuai3@huawei.com>
On Sat 14-05-22 17:05:19, Yu Kuai wrote:
> Just make the code a litter cleaner by removing the unnecessary
> variable 'sd'.
>
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
OK. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> block/bfq-wf2q.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
> index 15b97687493a..da189c732376 100644
> --- a/block/bfq-wf2q.c
> +++ b/block/bfq-wf2q.c
> @@ -1085,12 +1085,12 @@ static void __bfq_requeue_entity(struct bfq_entity *entity)
> }
>
> static void __bfq_activate_requeue_entity(struct bfq_entity *entity,
> - struct bfq_sched_data *sd,
> bool non_blocking_wait_rq)
> {
> struct bfq_service_tree *st = bfq_entity_service_tree(entity);
>
> - if (sd->in_service_entity == entity || entity->tree == &st->active)
> + if (entity->sched_data->in_service_entity == entity ||
> + entity->tree == &st->active)
> /*
> * in service or already queued on the active tree,
> * requeue or reposition
> @@ -1122,14 +1122,10 @@ static void bfq_activate_requeue_entity(struct bfq_entity *entity,
> bool non_blocking_wait_rq,
> bool requeue, bool expiration)
> {
> - struct bfq_sched_data *sd;
> -
> for_each_entity(entity) {
> - sd = entity->sched_data;
> - __bfq_activate_requeue_entity(entity, sd, non_blocking_wait_rq);
> -
> - if (!bfq_update_next_in_service(sd, entity, expiration) &&
> - !requeue)
> + __bfq_activate_requeue_entity(entity, non_blocking_wait_rq);
> + if (!bfq_update_next_in_service(entity->sched_data, entity,
> + expiration) && !requeue)
> break;
> }
> }
> --
> 2.31.1
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2022-05-19 11:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 9:05 [PATCH -next 0/8] multiple cleanup patches for bfq Yu Kuai
2022-05-14 9:05 ` [PATCH -next 1/8] block, bfq: cleanup bfq_weights_tree add/remove apis Yu Kuai
2022-05-19 10:59 ` Jan Kara
2022-05-14 9:05 ` [PATCH -next 2/8] block, bfq: cleanup __bfq_weights_tree_remove() Yu Kuai
2022-05-19 11:02 ` Jan Kara
2022-05-14 9:05 ` [PATCH -next 3/8] block, bfq: factor out code to update 'active_entities' Yu Kuai
2022-05-19 11:04 ` Jan Kara
2022-05-14 9:05 ` [PATCH -next 4/8] block, bfq: don't declare 'bfqd' as type 'void *' in bfq_group Yu Kuai
2022-05-19 11:01 ` Jan Kara
2022-05-14 9:05 ` [PATCH -next 5/8] block, bfq: cleanup bfq_activate_requeue_entity() Yu Kuai
2022-05-19 11:06 ` Jan Kara [this message]
2022-05-14 9:05 ` [PATCH -next 6/8] block, bfq: remove dead code for updating 'rq_in_driver' Yu Kuai
2022-05-19 11:06 ` Jan Kara
2022-05-14 9:05 ` [PATCH -next 7/8] block, bfq: cleanup bfq_bfqq_update_budg_for_activation() Yu Kuai
2022-05-19 11:18 ` Jan Kara
2022-05-19 13:21 ` yukuai (C)
2022-05-14 9:05 ` [PATCH -next 8/8] block, bfq: cleanup bfq_bfqq_handle_idle_busy_switch() Yu Kuai
2022-05-19 11:23 ` Jan Kara
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=20220519110601.vols2d4npm4pgvns@quack3.lan \
--to=jack@suse.cz \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paolo.valente@linaro.org \
--cc=tj@kernel.org \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.com \
/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®