From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: Query to optimize PageCache size in system Date: Wed, 13 May 2009 09:54:45 -0600 Message-ID: <20090513155444.GF15360@parisc-linux.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-arm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-usb@vger.kernel.org, ravish.tayal@conexant.com To: Ravish Tayal Return-path: Received: from palinux.external.hp.com ([192.25.206.14]:34334 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751067AbZEMPyp (ORCPT ); Wed, 13 May 2009 11:54:45 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, May 13, 2009 at 08:35:52PM +0530, Ravish Tayal wrote: > I am looking for help to reduce the number of cached pages in the > system. I am using 2.6.12 linux kernel on ARM processor.for my > embedded USB mass storage application. Why do you think the number of cached pages is a problem? What problem are you experiencing that you think is caused by having a large number of cached pages? > 3. Is there any provision in linux kernel through which I can restrict > the new page allocation for disk operation to not to be added in the > page-cache ? > 4. If I open the file with O_DIRECT Flag would page_cache be avoided, > irrespective it is file read or File write operations? Question 4 appears to be the answer to question 3. O_DIRECT works for both reads and writes, but does have restrictions on alignment. -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."