[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZpK8Nup6_sOvSZ7E@slm.duckdns.org>
Date: Sat, 13 Jul 2024 07:41:10 -1000
From: Tejun Heo <tj@...nel.org>
To: Xiu Jianfeng <xiujianfeng@...wei.com>
Cc: josef@...icpanda.com, axboe@...nel.dk, lizefan.x@...edance.com,
hannes@...xchg.org, cgroups@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] blk-cgroup: move congestion_count to struct blkcg
Hello,
Sorry about the previous reply. I completely misread the patch.
On Fri, Jul 12, 2024 at 08:51:41AM +0000, Xiu Jianfeng wrote:
...
> only compiling tested
It'd be better if there's a bit more verification.
> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> index 37e6cc91d576..01d3408c2fc6 100644
> --- a/block/blk-cgroup.c
> +++ b/block/blk-cgroup.c
> @@ -2183,11 +2183,13 @@ void blk_cgroup_bio_start(struct bio *bio)
> bool blk_cgroup_congested(void)
> {
> struct cgroup_subsys_state *css;
> + struct blkcg *blkcg;
It'd be better to define this within the loop.
> bool ret = false;
>
> rcu_read_lock();
> for (css = blkcg_css(); css; css = css->parent) {
Also, if we're now dealing with blkcg's, there's no reason to go blkcg ->
css -> blkcg again. It'd be better to get the initial blkcg and then walk up
using blkcg_parent().
> @@ -95,6 +95,8 @@ struct blkcg {
> struct cgroup_subsys_state css;
> spinlock_t lock;
> refcount_t online_pin;
> + /* If there is block congestion on this cgroup. */
> + atomic_t congestion_count;
Can you please match the indentation?
Thanks.
--
tejun
Powered by blists - more mailing lists