Thread (2 messages) 2 messages, 2 authors, 1999-05-26

Re: [VFS] move active filesystem

From: Stephen C. Tweedie <hidden>
Date: 1999-05-26 16:14:58

Hi,

On Wed, 19 May 1999 18:28:04 +0200 (CEST), Andrea Arcangeli
[off-list ref] said:
BTW, allowing dirty pages in the page cache may avoid I/O to disk but
won't avoid memcpy data to the page cache even if the page cache was just
uptdate. So I am convinced right now update_shared_mappings() is the right
thing to do and it's not an dirty hack. It's only a not very efficient
implementation that has to play with pgd/pmd/pte because we don't have
enough information (yet) from the pagemap.
To do it correctly, you need to do much more than just play with the
page tables in the way your current update_shared_mappings() does,
because the page can be at different addresses in different VAs.  For
MAP_SHARED pages we have a list of all the VAs, but for MAP_PRIVATE
pages we do not, and mremap() can still cause a shared private page
(eg. data pages after fork()) to appear at different locations in
different mms. 

Dealing with that is a little tricky, but you can do it by keeping lists
of "related" vmas, based on overlaps between the original addresses of
the vmas, not their current addresses.  Private page sharing can only
occur when the original address of the vmas overlapped, and that gives
us an invariant to check for over mremap().

--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help