From: Yosry Ahmed <yosryahmed@google.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeelb@google.com>,
Muchun Song <songmuchun@bytedance.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH mm-unstable RFC 3/5] memcg: calculate root usage from global state
Date: Tue, 11 Apr 2023 09:59:35 -0700 [thread overview]
Message-ID: <CAJD7tkZvRek3hJ1AyC7rPjTJTkKCM0DNLaTu1XXLGKmc3gdztA@mail.gmail.com> (raw)
In-Reply-To: <rdjvbr5zuwic27s27xcmguce2wfbqiyeu4bjr5pfxhprlxecui@4wsoogvb4ivp>
On Tue, Apr 11, 2023 at 5:53 AM Michal Koutný <mkoutny@suse.com> wrote:
>
> On Mon, Apr 03, 2023 at 10:03:35PM +0000, Yosry Ahmed <yosryahmed@google.com> wrote:
> > Instead, approximate the root usage from global state. This is not 100%
> > accurate, but the root usage has always been ill-defined anyway.
>
> Technically, this approximation should be closer to truth because global
> counters aren't subject to flushing "delay".
It is a tiny bit different when some pages are in swap, probably
because of swap slot caching and other swap specifics. At least in
cgroup v1, the swap uncharging and freeing of the underlying swap
entry may happen at different times. I think it practically doesn't
really matter though.
>
> >
> > Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
> > ---
> > mm/memcontrol.c | 24 +++++-------------------
> > 1 file changed, 5 insertions(+), 19 deletions(-)
>
> But feel free to add
> Reviewed-by: Michal Koutný <mkoutny@suse.com>
Thanks!
>
next prev parent reply other threads:[~2023-04-11 17:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 22:03 [PATCH mm-unstable RFC 0/5] cgroup: eliminate atomic rstat Yosry Ahmed
2023-04-03 22:03 ` [PATCH mm-unstable RFC 1/5] writeback: move wb_over_bg_thresh() call outside lock section Yosry Ahmed
2023-04-19 11:38 ` Michal Koutný
2023-04-20 20:23 ` Yosry Ahmed
2023-04-20 18:53 ` Shakeel Butt
2023-04-20 20:22 ` Yosry Ahmed
2023-04-21 8:53 ` Jan Kara
2023-04-21 17:21 ` Yosry Ahmed
2023-04-03 22:03 ` [PATCH mm-unstable RFC 2/5] memcg: flush stats non-atomically in mem_cgroup_wb_stats() Yosry Ahmed
2023-04-19 11:44 ` Michal Koutný
2023-04-20 18:55 ` Shakeel Butt
2023-04-03 22:03 ` [PATCH mm-unstable RFC 3/5] memcg: calculate root usage from global state Yosry Ahmed
2023-04-11 12:53 ` Michal Koutný
2023-04-11 16:59 ` Yosry Ahmed [this message]
2023-04-20 18:57 ` Shakeel Butt
2023-04-03 22:03 ` [PATCH mm-unstable RFC 4/5] memcg: remove mem_cgroup_flush_stats_atomic() Yosry Ahmed
2023-04-20 19:38 ` Shakeel Butt
2023-04-03 22:03 ` [PATCH mm-unstable RFC 5/5] cgroup: remove cgroup_rstat_flush_atomic() Yosry Ahmed
2023-04-20 19:40 ` Shakeel Butt
2023-04-20 19:48 ` Tejun Heo
2023-04-20 20:19 ` Yosry Ahmed
2023-04-03 22:04 ` [PATCH mm-unstable RFC 0/5] cgroup: eliminate atomic rstat Yosry Ahmed
2023-04-06 18:26 ` Tim Chen
2023-04-06 18:23 ` Tim Chen
2023-04-17 11:54 ` Yosry Ahmed
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=CAJD7tkZvRek3hJ1AyC7rPjTJTkKCM0DNLaTu1XXLGKmc3gdztA@mail.gmail.com \
--to=yosryahmed@google.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeelb@google.com \
--cc=songmuchun@bytedance.com \
--cc=viro@zeniv.linux.org.uk \
/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