Thank you Michael.  I am forwarding the email to another person -
MinChan, not sure if he knows the answer or not?

Hello MinChan, do you know the answer to my question?   Thanks.


---------- Forwarded message ----------
From: Michael Blizek <[EMAIL PROTECTED]>
Date: Sat, Nov 22, 2008 at 4:53 PM
Subject: Re: a question of mmap() of files into memory
To: Peter Teoh <[EMAIL PROTECTED]>
Cc: kernelnewbies <[email protected]>


Hi!

On 15:49 Sat 22 Nov     , 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.
>
> but then this is pagecache which cache the physically opened file, right?
>
> so...does there exists duplicated buffering?   (one in kernel -
> pagecache, and one in userspace - for mmap() content of the file in
> process memory)
>
> Correct?   So so...then it looks like a lot of duplicated stuff .....

When multiple programs load the same libraries into memory, they are mmap()ed
and shared. I cannot tell you exactly, but I do not think that the files exist
in an mmap() space and in the page cache. However, I have heared that readahead
and page reclaim is differently.
       -Michi
--
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com




-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to