From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by kanga.kvack.org (Postfix) with ESMTP id BFC696B009D for ; Tue, 11 Mar 2014 10:06:58 -0400 (EDT) Received: by mail-we0-f171.google.com with SMTP id t61so10075293wes.16 for ; Tue, 11 Mar 2014 07:06:58 -0700 (PDT) Received: from mx2.suse.de (cantor2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id hu4si21442803wjb.92.2014.03.11.07.06.56 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Mar 2014 07:06:57 -0700 (PDT) Date: Tue, 11 Mar 2014 15:06:55 +0100 From: Michal Hocko Subject: Re: [PATCH] mm: implement POSIX_FADV_NOREUSE 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 Content-Disposition: inline In-Reply-To: <1394533550-18485-1-git-send-email-matthias.wirth@gmail.com> Sender: owner-linux-mm@kvack.org List-ID: To: 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" , Dave Hansen , 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 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