public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Kemeng Shi <shikemeng@huawei.com>
To: <tj@kernel.org>, <josef@toxicpanda.com>, <axboe@kernel.dk>
Cc: <cgroups@vger.kernel.org>, <linux-block@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <shikemeng@huawei.com>
Subject: [PATCH v2 1/3] block: Remove redundant parent blkcg_gp check in check_scale_change
Date: Tue, 18 Oct 2022 19:12:38 +0800	[thread overview]
Message-ID: <20221018111240.22612-2-shikemeng@huawei.com> (raw)
In-Reply-To: <20221018111240.22612-1-shikemeng@huawei.com>

Function blkcg_iolatency_throttle will make sure blkg->parent is not
NULL before calls check_scale_change. And function check_scale_change
is only called in blkcg_iolatency_throttle.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
---
 block/blk-iolatency.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c
index 571fa95aafe9..b24d7b788ba3 100644
--- a/block/blk-iolatency.c
+++ b/block/blk-iolatency.c
@@ -403,9 +403,6 @@ static void check_scale_change(struct iolatency_grp *iolat)
 	u64 scale_lat;
 	int direction = 0;
 
-	if (lat_to_blkg(iolat)->parent == NULL)
-		return;
-
 	parent = blkg_to_lat(lat_to_blkg(iolat)->parent);
 	if (!parent)
 		return;
-- 
2.30.0


  reply	other threads:[~2022-10-18 11:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 11:12 [PATCH v2 0/3] A few cleanup patches for blk-iolatency.c Kemeng Shi
2022-10-18 11:12 ` Kemeng Shi [this message]
2022-10-18 11:12 ` [PATCH v2 2/3] block: Correct comment for scale_cookie_change Kemeng Shi
2022-11-01  9:38   ` Kemeng Shi
2022-11-02 14:11   ` Josef Bacik
2022-10-18 11:12 ` [PATCH v2 3/3] block: Replace struct rq_depth with unsigned int in struct iolatency_grp Kemeng Shi
2022-11-01 14:17 ` [PATCH v2 0/3] A few cleanup patches for blk-iolatency.c Jens Axboe

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=20221018111240.22612-2-shikemeng@huawei.com \
    --to=shikemeng@huawei.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=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