This series contains three cleanup patches to remove redundant check,
correct comment and simplify struct iolatency_grp in blk-iolatency.c.
Kemeng Shi (3):
block: Remove redundant parent blkcg_gp check in check_scale_change
block: Correct comment for scale_cookie_change
block: Replace struct rq_depth with unsigned int in struct
iolatency_grp
block/blk-iolatency.c | 33 ++++++++++++++-------------------
1 file changed, 14 insertions(+), 19 deletions(-)
--
2.30.0
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 <[email protected]>
---
block/blk-iolatency.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c
index e285152345a2..a8cc5abe91e5 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
Default queue depth of iolatency_grp is unlimited, so we scale down
quickly(once by half) in scale_cookie_change. Remove the "subtract
1/16th" part which is not the truth.
Signed-off-by: Kemeng Shi <[email protected]>
---
block/blk-iolatency.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c
index a8cc5abe91e5..2666afd7abdb 100644
--- a/block/blk-iolatency.c
+++ b/block/blk-iolatency.c
@@ -364,7 +364,7 @@ static void scale_cookie_change(struct blk_iolatency *blkiolat,
}
/*
- * Change the queue depth of the iolatency_grp. We add/subtract 1/16th of the
+ * Change the queue depth of the iolatency_grp. We add 1/16th of the
* queue depth at a time so we don't get wild swings and hopefully dial in to
* fairer distribution of the overall queue depth.
*/
--
2.30.0
Friendly ping ...
on 9/29/2022 3:40 PM, Kemeng Shi wrote:
> This series contains three cleanup patches to remove redundant check,
> correct comment and simplify struct iolatency_grp in blk-iolatency.c.
>
> Kemeng Shi (3):
> block: Remove redundant parent blkcg_gp check in check_scale_change
> block: Correct comment for scale_cookie_change
> block: Replace struct rq_depth with unsigned int in struct
> iolatency_grp
>
> block/blk-iolatency.c | 33 ++++++++++++++-------------------
> 1 file changed, 14 insertions(+), 19 deletions(-)
>
--
Best wishes
Kemeng Shi
On Thu, Sep 29, 2022 at 03:40:54PM +0800, Kemeng Shi wrote:
> Default queue depth of iolatency_grp is unlimited, so we scale down
> quickly(once by half) in scale_cookie_change. Remove the "subtract
> 1/16th" part which is not the truth.
>
Ok sure, but at least update the comment to indicate what we actually do when
scaling down. Thanks,
Josef
On Thu, Sep 29, 2022 at 03:40:53PM +0800, Kemeng Shi wrote:
> 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 <[email protected]>
Reviewed-by: Josef Bacik <[email protected]>
Thanks,
Josef