From: Michal Hocko Subject: Re: [PATCH] mm: implement POSIX_FADV_NOREUSE Date: Tue, 11 Mar 2014 15:06:55 +0100 Message-ID: <20140311140655.GD28292@dhcp22.suse.cz> References: <1394533550-18485-1-git-send-email-matthias.wirth@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Lukas Senger , Matthew Wilcox , Jeff Layton , "J. Bruce Fields" , Andrew Morton , Johannes Weiner , Rik van Riel , Lisa Du , Paul Mackerras , Sasha Levin , Benjamin Herrenschmidt , Fengguang Wu , Shaohua Li , Alexey Kardashevskiy , Minchan Kim , "Kirill A. Shutemov" , Al Viro , Steven Whitehouse , Mel Gorman , Cody P Schafer , Jiang Liu , David Rientjes , "Srivatsa S. Bhat" , To: Matthias Wirth Return-path: Content-Disposition: inline In-Reply-To: <1394533550-18485-1-git-send-email-matthias.wirth@gmail.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org 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 > Signed-off-by: Lukas Senger [...] -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org