linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Clarification on anon and anon_thp meanings from memory.stat in cgroup v2
@ 2023-07-11 18:25 Caden Ellis
  2023-07-17 10:52 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Caden Ellis @ 2023-07-11 18:25 UTC (permalink / raw)
  To: linux-mm

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-17 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 18:25 Clarification on anon and anon_thp meanings from memory.stat in cgroup v2 Caden Ellis
2023-07-17 10:52 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox