From: Caden Ellis <caden@schedmd.com>
To: linux-mm@kvack.org
Subject: Clarification on anon and anon_thp meanings from memory.stat in cgroup v2
Date: Tue, 11 Jul 2023 12:25:31 -0600 [thread overview]
Message-ID: <CANX7SW_mkHja_bWLAxQq4X=X-KuQK9rk4JYA_Mfvuqc7XxaotQ@mail.gmail.com> (raw)
I had a question about anon and anon_thp, values that come from
memory.stat in cgroups v2.
From this doc https://docs.kernel.org/admin-guide/cgroup-v2.html#memory-interface-files
:
anon
Amount of memory used in anonymous mappings such as brk(), sbrk(), and
mmap(MAP_ANONYMOUS)
...
anon_thp
Amount of memory used in anonymous mappings backed by transparent hugepages
I read that as anon_thp being a subset of anon, however it is not
explicit. The cgroup v1 documentation was explicit about the "rss"
stat including transparent hugepages. I have tested a few memory
eating programs (making sure that I have the transparent_hugepages
kernel parameter set to "always"), and anon always seems to be bigger
than anon_thp by a little. This helps but doesn't definitively prove
that anon_thp is a subset of anon.
Does anyone know for sure if anon_thp is a subset of anon? Preferable
if you can cite the source code. I have dug in the code for a while
but have not found the answer.
One last related question: Is the cgroups v2 equivalent of "rss" in v1
anon + swapcached?
Thank you,
Caden
next reply other threads:[~2023-07-11 18:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 18:25 Caden Ellis [this message]
2023-07-17 10:52 ` David Hildenbrand
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='CANX7SW_mkHja_bWLAxQq4X=X-KuQK9rk4JYA_Mfvuqc7XxaotQ@mail.gmail.com' \
--to=caden@schedmd.com \
--cc=linux-mm@kvack.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