public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Chengming Zhou <zhouchengming@bytedance.com>
To: axboe@kernel.dk, tj@kernel.org
Cc: paolo.valente@linaro.org, josef@toxicpanda.com,
	linux-block@vger.kernel.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Chengming Zhou <zhouchengming@bytedance.com>
Subject: [PATCH v2 1/3] block, bfq: remove BFQ_WEIGHT_LEGACY_DFL
Date: Thu,  6 Apr 2023 22:50:48 +0800	[thread overview]
Message-ID: <20230406145050.49914-2-zhouchengming@bytedance.com> (raw)
In-Reply-To: <20230406145050.49914-1-zhouchengming@bytedance.com>

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>
Acked-by: Tejun Heo <tj@kernel.org>
---
 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


  reply	other threads:[~2023-04-06 14:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 14:50 [PATCH v2 0/3] blk-cgroup: some cleanup Chengming Zhou
2023-04-06 14:50 ` Chengming Zhou [this message]
2023-04-06 14:50 ` [PATCH v2 2/3] blk-cgroup: delete cpd_bind_fn of blkcg_policy Chengming Zhou
2023-04-06 14:50 ` [PATCH v2 3/3] blk-cgroup: delete cpd_init_fn " Chengming Zhou
     [not found] ` <20230406145050.49914-1-zhouchengming-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2023-04-06 22:17   ` [PATCH v2 0/3] blk-cgroup: some cleanup Jens Axboe
2023-04-07 18:41   ` Bart Van Assche
     [not found]     ` <cab869b1-1cba-5698-55eb-a93d0596c869-HInyCGIudOg@public.gmane.org>
2023-04-07 18:44       ` Jens Axboe
2023-04-07 19:45         ` Bart Van Assche
2023-04-08  3:37       ` [External] " Chengming Zhou
2023-04-08 14:31         ` Chengming Zhou
2023-04-10  1:57     ` Yu Kuai
     [not found]       ` <d23a6891-96f0-2ee0-70c7-869123d85362-XF6JlduFytWkHkcT6e4Xnw@public.gmane.org>
2023-04-10 18:47         ` Bart Van Assche
     [not found]           ` <8651fa1f-7f50-03c6-cd85-e61aa44d4927-HInyCGIudOg@public.gmane.org>
2023-04-10 22:20             ` Bart Van Assche

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=20230406145050.49914-2-zhouchengming@bytedance.com \
    --to=zhouchengming@bytedance.com \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=josef@toxicpanda.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox