On Friday 12 August 2005 18:38, Jeff Dike wrote:
> On Wed, Aug 10, 2005 at 09:36:43PM +0200, Blaisorblade wrote:
> > About this, I was thinking back to what Rik said in Ottawa at the OLS. He
> > said "just use madvise(DONTNEED) on it", but I remarked that the pages
> > were file-backed.

> > Actually, however, since backing store for tmpfs is just
> > pagecache/swapcache memory,

> They are still file-backed, just the underlying filesystem is often tmpfs.
Yes, but for the VM, there is nothing else than pagecache and swapcache and 
swap entries. Since that call will drop them, on normal files backing store 
will remain, on tmpfs everything will vanish!

Hope you'll implement this soon, if it works.
> > I have the doubt that madvise(DONTNEED) already does what we need, and if
> > not that it might be easily fixed (since zap_page_range->unmap_vmas ->
> > unmap_page_range accept a range of pages to be flushed - that was a
> > recent change from Hugh Dickins).

> The man page is silent about whether the pages are synced to their
> backing store, and in any case, tmpfs hsa no real backing store.

> The desired behavior is that such pages are dropped as though they
> were clean, even if they are dirty.  It goes against the grain of a
> filesystem to drop dirty pages on the floor.
Yes, I remember.
> Looking at the code, the comment above madvise_dontneed is promising:

> /*
>  * Application no longer needs these pages.  If the pages are dirty,
>  * it's OK to just throw them away.  The app will be more careful about
>  * data it wants to keep.  Be sure to free swap resources too.

> which sounds like exactly what we need.

> And in zap_pte_range, I don't see any checking of PageDirty, so it
> looks like this works.
Exactly as mentioned in the comment. Well, working on remap_file_pages was 
very instructive for me (I'm going to send the first version of the revised 
patches)!
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

                
___________________________________ 
Yahoo! Messenger: chiamate gratuite in tutto il mondo 
http://it.beta.messenger.yahoo.com



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to