Clarification on anon and anon_thp meanings from memory.stat in cgroup v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux