From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] mm: implement POSIX_FADV_NOREUSE Date: Tue, 11 Mar 2014 14:27:29 -0700 Message-ID: <20140311142729.1e3e4e51186db4c8ee49a9f4@linux-foundation.org> References: <1394533550-18485-1-git-send-email-matthias.wirth@gmail.com> <20140311140655.GD28292@dhcp22.suse.cz> <531F2ABA.6060804@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Michal Hocko , Matthias Wirth , Lukas Senger , Matthew Wilcox , Jeff Layton , "J. Bruce Fields" , 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" Return-path: In-Reply-To: <531F2ABA.6060804@linux.intel.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 11 Mar 2014 08:24:42 -0700 Dave Hansen wrote: > On 03/11/2014 07:06 AM, Michal Hocko wrote: > >> > 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. > > Yeah, especially since the use so so transient. Yes, we're short on page flags. > This also looks to ignore the reuse flag for existing pages. And it sets PG_noreuse on new pages whether or not they were within the fadvise range (offset...offset+len). It's not really an fadvise operation at all. A practical implementation might go through the indicated pages, clear any referenced bits and move them to the tail of the inactive LRU? -- 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