Re: [PATCH] mm: implement POSIX_FADV_NOREUSE

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

 



On Tue 11-03-14 11:25:41, Matthias Wirth wrote:
> Backups, logrotation and indexers don't need files they read to remain
> in the page cache. Their pages can be reclaimed early and should not
> displace useful pages. POSIX specifices the POSIX_FADV_NOREUSE flag for
> these use cases but it's currently a noop.

Why don't you use POSIX_FADV_DONTNEED when you no longer use those
pages? E.g. on close()?

> In our implementation pages marked with the NoReuse flag are added to
> the tail of the LRU list the first time they are read. Therefore they
> are the first to be reclaimed.

page flags are really scarce and I am not sure this is the best usage of
the few remaining slots.

> We needed to add flags to the file and page structs in order to pass
> down the hint to the actual call to list_add.
> 
> Signed-off-by: Matthias Wirth <matthias.wirth@xxxxxxxxx>
> Signed-off-by: Lukas Senger <lukas@xxxxxxxxxxxx>
[...]
-- 
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]