From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by kanga.kvack.org (Postfix) with ESMTP id 2DE2A6B00A6 for ; Tue, 11 Mar 2014 11:34:19 -0400 (EDT) Received: by mail-pb0-f42.google.com with SMTP id rr13so8979270pbb.15 for ; Tue, 11 Mar 2014 08:34:18 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTP id ha5si20581976pbc.120.2014.03.11.08.34.17 for ; Tue, 11 Mar 2014 08:34:18 -0700 (PDT) Message-ID: <531F2ABA.6060804@linux.intel.com> Date: Tue, 11 Mar 2014 08:24:42 -0700 From: Dave Hansen MIME-Version: 1.0 Subject: Re: [PATCH] mm: implement POSIX_FADV_NOREUSE References: <1394533550-18485-1-git-send-email-matthias.wirth@gmail.com> <20140311140655.GD28292@dhcp22.suse.cz> In-Reply-To: <20140311140655.GD28292@dhcp22.suse.cz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko , Matthias Wirth 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" , Zhang Yanfei , Raghavendra K T , Lukas Czerner , Damien Ramonda , Mark Rutland , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org 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. I can see why using a flag is nice for a quick prototype, but this is a far cry from needing one. :) You might be able to reuse a bit like PageReadahead. You could probably also use a bit in the page pointer of the lruvec, or even have a percpu variable that stores a pointer to the 'struct page' you want to mark as NOREUSE. This also looks to ignore the reuse flag for existing pages. Have you thought about what the semantics should be there? Also, *should* readahead pages really have this flag set? If a very important page gets brought in via readahead, doesn't this put it at a disadvantage for getting aged out? -- 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