From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx184.postini.com [74.125.245.184]) by kanga.kvack.org (Postfix) with SMTP id 731136B0002 for ; Mon, 3 Jun 2013 11:20:42 -0400 (EDT) Date: Mon, 3 Jun 2013 11:20:32 -0400 From: Johannes Weiner Subject: Re: [patch 10/10] mm: workingset: keep shadow entries in check Message-ID: <20130603152032.GF15576@cmpxchg.org> References: <1369937046-27666-1-git-send-email-hannes@cmpxchg.org> <1369937046-27666-11-git-send-email-hannes@cmpxchg.org> <20130603082533.GH5910@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130603082533.GH5910@twins.programming.kicks-ass.net> Sender: owner-linux-mm@kvack.org List-ID: To: Peter Zijlstra Cc: linux-mm@kvack.org, Andi Kleen , Andrea Arcangeli , Andrew Morton , Greg Thelen , Christoph Hellwig , Hugh Dickins , Jan Kara , KOSAKI Motohiro , Mel Gorman , Minchan Kim , Rik van Riel , Michel Lespinasse , Seth Jennings , Roman Gushchin , metin d , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org On Mon, Jun 03, 2013 at 10:25:33AM +0200, Peter Zijlstra wrote: > On Thu, May 30, 2013 at 02:04:06PM -0400, Johannes Weiner wrote: > > Previously, page cache radix tree nodes were freed after reclaim > > emptied out their page pointers. But now reclaim stores shadow > > entries in their place, which are only reclaimed when the inodes > > themselves are reclaimed. This is problematic for bigger files that > > are still in use after they have a significant amount of their cache > > reclaimed, without any of those pages actually refaulting. The shadow > > entries will just sit there and waste memory. In the worst case, the > > shadow entries will accumulate until the machine runs out of memory. > > > > Can't we simply prune all refault entries that have a distance larger > than the memory size? Then we must assume that no refault entry means > its too old, which I think is a fair assumption. Two workloads bound to two nodes might not push pages through the LRUs at the same pace, so a distance might be bigger than memory due to the faster moving node, yet still be a hit in the slower moving one. We can't really know until we evaluate it on a per-zone basis. -- 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