From: Tang Yizhou <yizhou.tang@shopee.com>
To: yukuai@fygo.io, tj@kernel.org, axboe@kernel.dk
Cc: linux-block@vger.kernel.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org,
Tang Yizhou <yizhou.tang@shopee.com>
Subject: [PATCH] blk-throttle: Remove dead check in tg_conf_updated()
Date: Fri, 21 Aug 2026 00:05:47 +0800 [thread overview]
Message-ID: <20260820160547.357682-1-yizhou.tang@shopee.com> (raw)
From: Tang Yizhou <yizhou.tang@shopee.com>
The check in tg_conf_updated() was introduced for io.low, so remove it.
global ? tg->td->queue->root_blkg : tg_to_blkg(tg) was introduced in
commit 9bb67aeb9678 ("blk-throttle: respect 0 bps/iops settings for
io.low"). Remove it, too.
Fixes: bf20ab538c81 ("blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW")
Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com>
---
block/blk-throttle.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index ffc3b70065d4..fa742e63807d 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1267,7 +1267,7 @@ static int tg_print_conf_uint(struct seq_file *sf, void *v)
return 0;
}
-static void tg_conf_updated(struct throtl_grp *tg, bool global)
+static void tg_conf_updated(struct throtl_grp *tg)
{
struct throtl_service_queue *sq = &tg->service_queue;
struct cgroup_subsys_state *pos_css;
@@ -1286,16 +1286,8 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
* restrictions in the whole hierarchy and allows them to bypass
* blk-throttle.
*/
- blkg_for_each_descendant_pre(blkg, pos_css,
- global ? tg->td->queue->root_blkg : tg_to_blkg(tg)) {
- struct throtl_grp *this_tg = blkg_to_tg(blkg);
-
- tg_update_has_rules(this_tg);
- /* ignore root/second level */
- if (!cgroup_subsys_on_dfl(io_cgrp_subsys) || !blkg->parent ||
- !blkg->parent->parent)
- continue;
- }
+ blkg_for_each_descendant_pre(blkg, pos_css, tg_to_blkg(tg))
+ tg_update_has_rules(blkg_to_tg(blkg));
rcu_read_unlock();
/*
@@ -1388,7 +1380,7 @@ static ssize_t tg_set_conf(struct kernfs_open_file *of,
else
*(unsigned int *)((void *)tg + of_cft(of)->private) = v;
- tg_conf_updated(tg, false);
+ tg_conf_updated(tg);
ret = 0;
unprep:
@@ -1610,7 +1602,7 @@ static ssize_t tg_set_limit(struct kernfs_open_file *of,
tg->iops[READ] = v[2];
tg->iops[WRITE] = v[3];
- tg_conf_updated(tg, false);
+ tg_conf_updated(tg);
ret = 0;
unprep:
blkg_conf_unprep(&ctx);
--
2.43.0
next reply other threads:[~2026-08-20 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 16:05 Tang Yizhou [this message]
2026-08-21 2:45 ` [PATCH] blk-throttle: Remove dead check in tg_conf_updated() Tao Cui
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=20260820160547.357682-1-yizhou.tang@shopee.com \
--to=yizhou.tang@shopee.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=yukuai@fygo.io \
/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