Thread (14 messages) 14 messages, 2 authors, 2021-03-22
STALE1897d
Revisions (2)
  1. v2 current
  2. v3 [diff vs current]

[RFC PATCH v2 10/11] bfq: remove unnecessary initialization logic

From: brookxu <hidden>
Date: 2021-03-12 11:09:54
Also in: linux-block, lkml
Subsystem: bfq i/o scheduler, block layer, control group - block io controller (blkio), the rest · Maintainers: Yu Kuai, Jens Axboe, Tejun Heo, Josef Bacik, Linus Torvalds

From: Chunguang Xu <redacted>

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 <redacted>
---
 block/bfq-cgroup.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index ab4bc410e635..05054e1b5d97 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -1514,15 +1514,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 */
-- 
2.30.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help