Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965694AbXAYIHW (ORCPT ); Thu, 25 Jan 2007 03:07:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965693AbXAYIHW (ORCPT ); Thu, 25 Jan 2007 03:07:22 -0500 Received: from ausmtp05.au.ibm.com ([202.81.18.154]:49621 "EHLO ausmtp05.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965696AbXAYIHV (ORCPT ); Thu, 25 Jan 2007 03:07:21 -0500 Message-ID: <45B8652B.5040200@linux.vnet.ibm.com> Date: Thu, 25 Jan 2007 13:37:07 +0530 From: Vaidyanathan Srinivasan Organization: IBM User-Agent: Thunderbird 1.5.0.5 (X11/20060728) MIME-Version: 1.0 To: Christoph Lameter CC: Erik Andersen , Nick Piggin , Peter Zijlstra , Aubrey Li , Robin Getz , "Henn, erich, Michael" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] Limit the size of the pagecache References: <1169625333.4493.16.camel@taijtu> <45B7561C.9000102@yahoo.com.au> <20070124200614.GA25690@codepoet.org> In-Reply-To: Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1339 Lines: 34 Christoph Lameter wrote: > On Wed, 24 Jan 2007, Erik Andersen wrote: > >> It would be far more useful if an application could hint to the >> pagecache as to which files are and which files as not worth >> caching, especially when the application knows a priori that data >> from a particular file will or will not ever be reused. > > It can give such hints via madvise(2). I think you meant fadvise. That is certainly a possibility which we need to work on. Current implementation of fadvise only throttles read ahead in case of sequential access and flushes the file in case of DONTNEED. We leave it at default for NOREUSE. In case of DONTNEED and NOREUSE, we need to limit the pages used for page cache and also reclaim them as soon as possible. Interaction of mmap() and fadvise is little more dfficult to handle. --Vaidy > - > 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/ > - 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/