linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] block, bfq: remove BFQ_WEIGHT_LEGACY_DFL
@ 2023-03-28 14:56 Chengming Zhou
  2023-03-28 14:56 ` [PATCH 2/4] blk-cgroup: delete cpd_bind_fn of blkcg_policy Chengming Zhou
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Chengming Zhou @ 2023-03-28 14:56 UTC (permalink / raw)
  To: paolo.valente, axboe, tj, josef
  Cc: linux-block, cgroups, linux-kernel, Chengming Zhou

BFQ_WEIGHT_LEGACY_DFL is the same as CGROUP_WEIGHT_DFL, which means
we don't need cpd_bind_fn() callback to update default weight when
attached to a hierarchy.

This patch remove BFQ_WEIGHT_LEGACY_DFL and cpd_bind_fn().

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
 block/bfq-cgroup.c  | 4 +---
 block/bfq-iosched.h | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index 89ffb3aa992c..a2ab5dd58068 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -504,8 +504,7 @@ static void bfq_cpd_init(struct blkcg_policy_data *cpd)
 {
 	struct bfq_group_data *d = cpd_to_bfqgd(cpd);
 
-	d->weight = cgroup_subsys_on_dfl(io_cgrp_subsys) ?
-		CGROUP_WEIGHT_DFL : BFQ_WEIGHT_LEGACY_DFL;
+	d->weight = CGROUP_WEIGHT_DFL;
 }
 
 static void bfq_cpd_free(struct blkcg_policy_data *cpd)
@@ -1302,7 +1301,6 @@ struct blkcg_policy blkcg_policy_bfq = {
 
 	.cpd_alloc_fn		= bfq_cpd_alloc,
 	.cpd_init_fn		= bfq_cpd_init,
-	.cpd_bind_fn	        = bfq_cpd_init,
 	.cpd_free_fn		= bfq_cpd_free,
 
 	.pd_alloc_fn		= bfq_pd_alloc,
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h
index 69aaee52285a..467e8cfc41a2 100644
--- a/block/bfq-iosched.h
+++ b/block/bfq-iosched.h
@@ -20,7 +20,6 @@
 
 #define BFQ_DEFAULT_QUEUE_IOPRIO	4
 
-#define BFQ_WEIGHT_LEGACY_DFL	100
 #define BFQ_DEFAULT_GRP_IOPRIO	0
 #define BFQ_DEFAULT_GRP_CLASS	IOPRIO_CLASS_BE
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-06 14:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 14:56 [PATCH 1/4] block, bfq: remove BFQ_WEIGHT_LEGACY_DFL Chengming Zhou
2023-03-28 14:56 ` [PATCH 2/4] blk-cgroup: delete cpd_bind_fn of blkcg_policy Chengming Zhou
2023-03-28 14:57 ` [PATCH 3/4] blk-cgroup: delete cpd_init_fn " Chengming Zhou
2023-03-28 14:57 ` [PATCH 4/4] blk-cgroup: change BLKCG_MAX_POLS back to 5 Chengming Zhou
2023-03-29 18:59 ` [PATCH 1/4] block, bfq: remove BFQ_WEIGHT_LEGACY_DFL Tejun Heo
2023-04-06 14:34   ` Chengming Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).