From: Nhat Pham <nphamcs@gmail.com>
To: David Rientjes <rientjes@google.com>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>,
akpm@linux-foundation.org, hannes@cmpxchg.org,
shakeel.butt@linux.dev, roman.gushchin@linux.dev,
muchun.song@linux.dev, chris@chrisdown.name, tj@kernel.org,
lizefan.x@bytedance.com, mkoutny@suse.com, corbet@lwn.net,
lnyng@meta.com, cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH v4 1/1] memcg/hugetlb: Add hugeTLB counters to memcg
Date: Wed, 13 Nov 2024 17:08:25 -0800 [thread overview]
Message-ID: <CAKEwX=NYPoEHKtXG_j_EL8XBkYJbYK_84XUi+JioGN5SnpLg0g@mail.gmail.com> (raw)
In-Reply-To: <c41adcce-473d-c1a7-57a1-0c44ea572679@google.com>
On Wed, Nov 13, 2024 at 2:42 PM David Rientjes <rientjes@google.com> wrote:
>
> On Mon, 11 Nov 2024, David Rientjes wrote:
>
> >
> > If broken down into hugetlb_2048kB and hugetlb_1048576kB on x86, for
> > example, users could still do sum of memory.stat, no?>
> >
>
> Friendly ping on this, would there be any objections to splitting the
> memory.stat metrics out to be per hugepage size?
My 2c is that it's extra complexity + overhead (IIUC these stats are
hierarchical and hence would contribute to flushing overhead). So we
should justify them with some concrete use cases if we are to add
them.
From my end, I need hugetlb usage when I want to reason about memory
dynamics. This is because hugetlb is a bit special/weird - it cannot
be swapped out for e.g. So I have subtract hugetlb usage from overall
cgroup's memory usage before making any analysis that involves
swapping. For this use case, I just need to know how much memory is
consumed by hugetlb, regardless of the type (2M or 1G). I assume many
use cases are similar in that sense.
Do you or Google have a concrete use case in mind that requires
hugetlb categorization? :)
next prev parent reply other threads:[~2024-11-14 1:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 20:44 Joshua Hahn
2024-11-10 2:19 ` David Rientjes
2024-11-11 15:58 ` Joshua Hahn
2024-11-11 17:41 ` David Rientjes
2024-11-13 22:42 ` David Rientjes
2024-11-14 1:08 ` Nhat Pham [this message]
2024-11-14 5:26 ` Johannes Weiner
2024-11-14 10:33 ` Michal Hocko
2024-11-14 16:36 ` Roman Gushchin
2024-11-17 3:34 ` David Rientjes
2024-11-14 16:42 ` Joshua Hahn
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='CAKEwX=NYPoEHKtXG_j_EL8XBkYJbYK_84XUi+JioGN5SnpLg0g@mail.gmail.com' \
--to=nphamcs@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=chris@chrisdown.name \
--cc=corbet@lwn.net \
--cc=hannes@cmpxchg.org \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan.x@bytedance.com \
--cc=lnyng@meta.com \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
/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