I'm trying to locate exact machine memory pages that have been allocated back files which are stored in a Linux RAM disk. For example, for a process, there is /proc/pid/pagemap that tells you exactly which machine pages a process is using. I'm looking for similar thing for RAM disks. Do you know of a kernel module or data structure that may have list of the pages assigned to a RAM disk?
For example, if I create a RAM disk 1MB in size (assuming 4KB pages) that means there should be 256 machine pages assigned to that RAM disk (2^22/2^14=256).
RAM disks build on Linux's page cache, so seems like a good point to start at, but I'm not sure how to correlate which page cache entries correspond to a RAM disk.