Re: mmap doubt??

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

 



Hi Adheer
But while reading about mmap I found that  call to mmap eventually
leads invocation of "do_mmap_pgoff()" which allocates the vma area for
the file to be mmap'd .

The do_mmap_pgoff() make calls to make_pages_present() which in turn
calls get_user_pages()....

This get_user_pages() does the page fault and brings the file data
from disk to pages in VMA in process address space...
Without checking the code by myself, I think you understand the code incorrectly. Maybe what you see is not in the case mmap() is used to map a file into a memory region. From what I know, that is in the case of anonymous mapping, to be precise, when you asked the related pages in this memory region to be always present in RAM (similar like calling mlock()/mlockall).

regards,

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux