From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Chow Subject: Re: fs block size and PAGE_CACHE_SIZE Date: Mon, 12 May 2003 10:07:17 +0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3EBF01D5.7000002@shaolinmicro.com> References: <3EB7F401.1010908@shaolinmicro.com> <3EBE85E8.50906@shaolinmicro.com> <16062.60265.978839.698174@charged.uio.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from [202.94.238.145] ([202.94.238.145]:42120 "EHLO mail.shaolinmicro.com") by vger.kernel.org with ESMTP id S261852AbTELByi (ORCPT ); Sun, 11 May 2003 21:54:38 -0400 To: trond.myklebust@fys.uio.no List-Id: linux-fsdevel.vger.kernel.org Trond Myklebust wrote: >>>>>>" " == David Chow writes: >>>>>> >>>>>> > > > How can you make sure there are no race conditions in > > populating multiple page caches and making them up-to-date > > afterwards? Since readpage only make sures you lock one page, > >Have a browse through mm/readahead.c (in particular read_pages() and >read_cache_pages()). >The page is is anonymous when it gets locked, and is only added to the >page cache) if there is no existing page. The lock is only released by >the filler. > > > If readpages() is added for 2.5, it doesn't mean read page > > don't have to implement readpage(), right? > >Right. You still have to implement readpage. > So it is impossible to do under 2.4? Since all the design of VFS and page cache assumes the underlying fs uses a 4k page or something equivalent less to the size of a PAGE_CACHE_SIZE as the largest unit of a cache. If you read Phillip Lougher's mail which points to the squash fs (read-only), plus the problem of sleeping which really impossible to implement a read/write fs on smp systems (which I suppose to, and the current fs already supported). If it is impossible, I don't bother to think though. regards, David Chow > >