[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <y7vvyndehadwy5ouounm5oyo52bqhsysiizuphzki2h3bwpdpc@3hvaq6sp6f4k>
Date: Tue, 22 Aug 2023 15:01:01 +0200
From: Michal Koutný <mkoutny@...e.com>
To: Yosry Ahmed <yosryahmed@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Shakeel Butt <shakeelb@...gle.com>,
Muchun Song <muchun.song@...ux.dev>,
Ivan Babrou <ivan@...udflare.com>, Tejun Heo <tj@...nel.org>,
linux-mm@...ck.org, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] mm: memcg: add a helper for non-unified stats
flushing
On Mon, Aug 21, 2023 at 08:54:57PM +0000, Yosry Ahmed <yosryahmed@...gle.com> wrote:
> +static void do_stats_flush(struct mem_cgroup *memcg)
> +{
> + cgroup_rstat_flush(memcg->css.cgroup);
if(memcg == root_mem_cgroup)
atomic_set(&stats_flush_threshold, 0);
> +}
> +
> /*
> * do_unified_stats_flush - do a unified flush of memory cgroup statistics
> *
> @@ -656,7 +667,7 @@ static void do_unified_stats_flush(void)
>
> WRITE_ONCE(flush_next_time, jiffies_64 + 2*FLUSH_TIME);
>
> - cgroup_rstat_flush(root_mem_cgroup->css.cgroup);
> + do_stats_flush(root_mem_cgroup);
>
- atomic_set(&stats_flush_threshold, 0);
> atomic_set(&stats_flush_ongoing, 0);
You may reset stats_flush_threshold to save the unified flushers some
work.
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists