Clarifying what shmem pages are
John Locke
jlockefree at gmail.com
Fri Aug 14 12:58:56 EDT 2015
I'm digging into the kernel VM and trying to understand what exactly
shmem pages are. I'm trying to understand what the "Shmem" line in
/proc/meminfo is signifying. I'm confused because I see notes saying
shmem pages are in the page cache but I thought they aren't
file-backed memory. In digging some more it seems shmem pages are
backed by a virtual filesystem, shmemfs. From my understanding
NR_FILE_PAGES indicates the number of file-backed pages and they are
always in the page-cache. When I look into mm/shmem.c it seems
NR_SHMEM_PAGES and NR_FILE_PAGES are always incremented and
decremented together so I think maybe shmem pages are treated as
file-backed but clarifying this would be great.
More information about the Kernelnewbies
mailing list