[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230323155613.GC739026@cmpxchg.org>
Date: Thu, 23 Mar 2023 11:56:13 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Yosry Ahmed <yosryahmed@...gle.com>
Cc: Tejun Heo <tj@...nel.org>, Josef Bacik <josef@...icpanda.com>,
Jens Axboe <axboe@...nel.dk>,
Zefan Li <lizefan.x@...edance.com>,
Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Shakeel Butt <shakeelb@...gle.com>,
Muchun Song <muchun.song@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>,
Vasily Averin <vasily.averin@...ux.dev>,
cgroups@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
bpf@...r.kernel.org
Subject: Re: [RFC PATCH 4/7] memcg: sleep during flushing stats in safe
contexts
On Thu, Mar 23, 2023 at 04:00:34AM +0000, Yosry Ahmed wrote:
> @@ -644,26 +644,26 @@ static void __mem_cgroup_flush_stats(void)
> return;
>
> flush_next_time = jiffies_64 + 2*FLUSH_TIME;
> - cgroup_rstat_flush(root_mem_cgroup->css.cgroup, false);
> + cgroup_rstat_flush(root_mem_cgroup->css.cgroup, may_sleep);
How is it safe to call this with may_sleep=true when it's holding the
stats_flush_lock?
> atomic_set(&stats_flush_threshold, 0);
> spin_unlock(&stats_flush_lock);
> }
Powered by blists - more mailing lists