Re: [PATCH] mm: implement POSIX_FADV_NOREUSE

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

 



On Wed 12-03-14 12:59:52, Lukas Senger wrote:
> > Why don't you use POSIX_FADV_DONTNEED when you no longer use those
> > pages? E.g. on close()?
> 
> Because DONTNEED throws out the pages even if other processes use them
> as well, so additional hacks are needed to prevent that (see for
> example[1]).

OK, that might be indeed to harsh.

[...]
> Ok, we understand that we can't add a page flag. We tried to find a flag
> to recycle but did not succeed. lruvec doesn't have page pointers and we
> don't have access to a pagevec and the file struct at the same time. We
> don't really understand the last suggestion, as we need to save this
> information for more than one page and going over a list every time we
> add something to an lru list doesn't seem like a good idea.
> 
> Would it be acceptable to add a member to struct page for our purpose?

No, it won't be that easy ;).

I think the Andrew's proposal makes sense. Why not simply move the pages
to the tail of inactive LRUs.

Or another approach might be to drop only those pages from the range
which are not mapped by other processes (something like a lite
DONTNEED).

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]