All of lore.kernel.org
 help / color / mirror / Atom feed
From: brookxu <brookxu.cn@gmail.com>
To: paolo.valente@linaro.org, axboe@kernel.dk, tj@kernel.org
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/8] bfq: remove unnecessary initialization logic
Date: Tue, 20 Apr 2021 19:20:22 +0800	[thread overview]
Message-ID: <686dd8506bb511ae181a99c9b45f287233aa2ecf.1618916839.git.brookxu@tencent.com> (raw)
In-Reply-To: <cover.1618916839.git.brookxu@tencent.com>
In-Reply-To: <cover.1618916839.git.brookxu@tencent.com>

From: Chunguang Xu <brookxu@tencent.com>

Since we will initialize sched_data.service_tree[] in
bfq_init_root_group(), bfq_create_group_hierarchy() can
ignore this part of the initialization, which can avoid
repeated initialization.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
---
 block/bfq-cgroup.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index 50d06c7..c8c68dc 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -1429,15 +1429,11 @@ void bfqg_and_blkg_put(struct bfq_group *bfqg) {}
 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node)
 {
 	struct bfq_group *bfqg;
-	int i;
 
 	bfqg = kmalloc_node(sizeof(*bfqg), GFP_KERNEL | __GFP_ZERO, node);
 	if (!bfqg)
 		return NULL;
 
-	for (i = 0; i < BFQ_IOPRIO_CLASSES; i++)
-		bfqg->sched_data.service_tree[i] = BFQ_SERVICE_TREE_INIT;
-
 	return bfqg;
 }
 #endif	/* CONFIG_BFQ_GROUP_IOSCHED */
-- 
1.8.3.1


WARNING: multiple messages have this Message-ID (diff)
From: brookxu <brookxu.cn@gmail.com>
To: paolo.valente@linaro.org, axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RESEND PATCH 5/8] bfq: remove unnecessary initialization logic
Date: Thu, 10 Jun 2021 15:22:34 +0800	[thread overview]
Message-ID: <686dd8506bb511ae181a99c9b45f287233aa2ecf.1618916839.git.brookxu@tencent.com> (raw)
Message-ID: <20210610072234.BoYduqQt9o3ZiExo63RK3u2a8h126URC6ZoybZKAi68@z> (raw)
In-Reply-To: <1ce935f1bb10e0c7ecea7b79b826ff4cfc89acf0.1618916839.git.brookxu@tencent.com>
In-Reply-To: <cover.1618916839.git.brookxu@tencent.com>

From: Chunguang Xu <brookxu@tencent.com>

Since we will initialize sched_data.service_tree[] in
bfq_init_root_group(), bfq_create_group_hierarchy() can
ignore this part of the initialization, which can avoid
repeated initialization.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
---
 block/bfq-cgroup.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index 50d06c7..c8c68dc 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -1429,15 +1429,11 @@ void bfqg_and_blkg_put(struct bfq_group *bfqg) {}
 struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node)
 {
 	struct bfq_group *bfqg;
-	int i;
 
 	bfqg = kmalloc_node(sizeof(*bfqg), GFP_KERNEL | __GFP_ZERO, node);
 	if (!bfqg)
 		return NULL;
 
-	for (i = 0; i < BFQ_IOPRIO_CLASSES; i++)
-		bfqg->sched_data.service_tree[i] = BFQ_SERVICE_TREE_INIT;
-
 	return bfqg;
 }
 #endif	/* CONFIG_BFQ_GROUP_IOSCHED */
-- 
1.8.3.1


  parent reply	other threads:[~2021-04-20 11:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 11:20 [PATCH 0/8] bfq: misc updates brookxu
2021-04-20 11:20 ` [PATCH 1/8] bfq: introduce bfq_entity_to_bfqg helper method brookxu
2021-06-10  7:22   ` [RESEND PATCH " brookxu
2021-04-20 11:20 ` [PATCH 2/8] bfq: convert the type of bfq_group.bfqd to bfq_data* brookxu
2021-06-10  7:22   ` [RESEND PATCH " brookxu
2021-04-20 11:20 ` [PATCH 3/8] bfq: limit the IO depth of CLASS_IDLE to 1 brookxu
2021-06-10  7:22   ` [RESEND PATCH " brookxu
2021-04-20 11:20 ` [PATCH 4/8] bfq: keep the minimun bandwidth for CLASS_BE brookxu
2021-06-10  7:22   ` [RESEND PATCH " brookxu
2021-04-20 11:20 ` brookxu [this message]
2021-06-10  7:22   ` [RESEND PATCH 5/8] bfq: remove unnecessary initialization logic brookxu
2021-04-20 11:20 ` [PATCH 6/8] bfq: optimize the calculation of bfq_weight_to_ioprio() brookxu
2021-06-10  7:22   ` [RESEND PATCH " brookxu
2021-04-20 11:20 ` [PATCH 7/8] bfq: reset entity->prio_changed in bfq_init_entity() brookxu
2021-06-10  7:22   ` [RESEND PATCH " brookxu
2021-04-20 11:20 ` [PATCH 8/8] bfq: remove unnecessary BFQ_DEFAULT_GRP_IOPRIO brookxu
2021-06-10  7:22   ` [RESEND PATCH " brookxu
2021-06-10  7:22 ` [RESEND PATCH 1/8] bfq: introduce bfq_entity_to_bfqg helper method brookxu
2021-06-10  8:31   ` Oleksandr Natalenko
2021-06-10  9:05     ` brookxu
2021-06-10  9:18     ` Piotr Górski

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=686dd8506bb511ae181a99c9b45f287233aa2ecf.1618916839.git.brookxu@tencent.com \
    --to=brookxu.cn@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paolo.valente@linaro.org \
    --cc=tj@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.