How and where are a processes's PTEs set when mmaping a file in a tmpfs?

Bijan Tabatabai bijan311 at
Tue Sep 1 15:33:55 EDT 2020


I am looking into what happens under the hood when a file on a tmpfs
partition gets mmap'd. I am particularly interested in seeing how the
PTEs for the new memory region are populated, but I can't seem to find
exactly where that happens. I tried looking through the shmem_mmap and
shmem_fault functions as well as other places in mm/shmem.c without
much luck, though it is possible I just missed it.

Can someone point me in the right direction?


More information about the Kernelnewbies mailing list