Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752011AbXAYC1p (ORCPT ); Wed, 24 Jan 2007 21:27:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752025AbXAYC1p (ORCPT ); Wed, 24 Jan 2007 21:27:45 -0500 Received: from wx-out-0506.google.com ([66.249.82.224]:41492 "EHLO wx-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752011AbXAYC1o (ORCPT ); Wed, 24 Jan 2007 21:27:44 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uZuim5m1G+htU62Qxclv2mvMscVJrIOwd7IgmlpEIaxEPU+5Jx234wI3L7I2RKe5r78SYJWTy9uaBQWvQMNW/6gOAp/NvB7nFKAV1jo30MEixJRJyvchdP10mfGV+9aKwltEXXmK+hPfn5iNyO1vcygCffL5xsrzFZ4G6QecBdI= Message-ID: <6d6a94c50701241827y715353ccwb8c4b4697e5607ca@mail.gmail.com> Date: Thu, 25 Jan 2007 10:27:43 +0800 From: "Aubrey Li" To: "Peter Zijlstra" Subject: Re: [RFC] Limit the size of the pagecache Cc: "Christoph Lameter" , "Vaidyanathan Srinivasan" , "Nick Piggin" , "Robin Getz" , "Frysinger, Michael" , "Bryan Wu" , "Hennerich, Michael" , linux-mm@kvack.org, linux-kernel@vger.kernel.org In-Reply-To: <1169650616.6189.41.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1169625333.4493.16.camel@taijtu> <6d6a94c50701240622n30f1092cq4570f84160fe87f7@mail.gmail.com> <1169650616.6189.41.camel@twins> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2852 Lines: 66 On 1/24/07, Peter Zijlstra wrote: > On Wed, 2007-01-24 at 22:22 +0800, Aubrey Li wrote: > > On 1/24/07, Peter Zijlstra wrote: > > > On Tue, 2007-01-23 at 16:49 -0800, Christoph Lameter wrote: > > > > This is a patch using some of Aubrey's work plugging it in what is IMHO > > > > the right way. Feel free to improve on it. I have gotten repeatedly > > > > requests to be able to limit the pagecache. With the revised VM statistics > > > > this is now actually possile. I'd like to know more about possible uses of > > > > such a feature. > > > > > > > > > > > > > > > > > > > > It may be useful to limit the size of the page cache for various reasons > > > > such as > > > > > > > > 1. Insure that anonymous pages that may contain performance > > > > critical data is never subject to swap. > > > > > > This is what we have mlock for, no? > > > > > > > 2. Insure rapid turnaround of pages in the cache. > > > > > > This sounds like we either need more fadvise hints and/or understand why > > > the VM doesn't behave properly. > > > > > > > 3. Reserve memory for other uses? (Aubrey?) > > > > > > He wants to make a nommu system act like a mmu system; this will just > > > never ever work. > > > > Nope. Actually my nommu system works great with some of patches made by us. > > What let you think this will never work? > > Because there are perfectly valid things user-space can do to mess you > up. I forgot the test-case but it had something to do with opening a > million files, this will scatter slab pages all over the place. > > Also, if you cycle your large user-space allocations a bit unluckily > you'll also fragment it into oblivion. > > So you can not guarantee it will not fragment into smithereens stopping > your user-space from using large than page size allocations. > > If your user-space consists of several applications that do dynamic > memory allocation of various sizes its a matter of (run-) time before > things will start failing. > > If you prealloc a large area at boot time (like we now do for hugepages) > and use that for user-space, you might 'reset' the status quo by cycling > the whole of userspace. > It seems you are talking about a perfect system. Opening a million files will never be the requirement of my system. You know I'm working on an embedded system, most of the time the whole system just run for one application, if I can guarantee this application works forever, I think it's enough. I'm not trying to make a nommu system act like a mmu system, it's impossible, I just make my nommu system work. -Aubrey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/