Re: a question of mmap() of files into memory

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

 





On Sun, Nov 23, 2008 at 2:23 AM, Rik van Riel <riel@xxxxxxxxxxx> wrote:
Peter Teoh wrote:
when a process mmap() a section of a file into its own process memory,
the process memory will maintain a copy of the data of that section of
the file.

No, it does not maintain a copy.

It mmaps the page cache pages into its own address space.
 
   According to your explanation, the flow is physical file(on disk)-->Page Cache(on memory, but in kernel space)-->Process Memory(on  memory, but in user space). Is it? I am not sure....


so...does there exists duplicated buffering?   (one in kernel -
pagecache, and one in userspace - for mmap() content of the file in
process memory)

No, there is no such double buffering.

   But what is the difference? Why linux do it?


--
All rights reversed.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




--
National Research Center for Intelligent Computing Systems
Institute of Computing Technology, Chinese Academy of Sciences

[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