[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linux page cache
Thanks for your quick answer.
> > 2 ) When a file is memory mapped from disk, are
> all of
> > its pages automatically stored in the page cache ?
>
> No. Linux does demand paging. That means that when a
> page
> is mmap()ed, NONE of its pages will be in memory,
> they
> will only be brought in the moment somebody tries to
> access
> those pages...
I agree with you, I didn't express myself correctly.
What I wanted to say is :
when an image is executed, the content of the
executable image is brought into processes virtual
address space. The executable file is not brought into
physical memory, it is merely linked into the
processes virtual memory : that is memory mapping.
When a process accesses a virtual address of this
executable processes virtual memory, if this virtual
address does not have a valid page table entry, the
processor report a page fault to linux.
A nopage operation is used => linux bring into
physical memory the required image page.
If the required image page is not in the swap file,
linux uses the page cache and check if it's in it.
If it is in none of them, it takes it from the disk.
(Am I right when I'm saying all of that ?).
Then the image page is in physical memory but is it
yet referenced in the page cache or will it be later ?
How does the page cache work ? Are all pages brought
into memory automatically referenced into the page
cache ?
> The page cache memory _is_ physical memory (caching
> in
> swap somehow doesn't make that much sense)...
Yes of course but I didn't know how to differentiate
pages in referenced by table page and pages referenced
by page cache.
=====
Sabrina
04-92-11-41-78
06-84-80-95-51
___________________________________________________________
Do You Yahoo!?
Achetez, vendez! Ā votre prix! Sur http://encheres.yahoo.fr
-
Linux-mm-www: builders list for the Linux-MM website
Archive: http://humbolt.nl.linux.org/lists/
Web site: http://www.linux.eu.org/Linux-MM/