From: Nick Piggin Subject: Re: [rfc][patch 3/5] afs: new aops Date: Thu, 15 Nov 2007 22:37:58 +0100 Message-ID: <20071115213758.GB30158@wotan.suse.de> References: <20071113004459.GE30650@wotan.suse.de> <20071113001548.GA30650@wotan.suse.de> <20071112071448.GE22953@wotan.suse.de> <20071112071245.GB22953@wotan.suse.de> <6161.1194881354@redhat.com> <17445.1194913805@redhat.com> <18637.1194951385@redhat.com> <30440.1195042723@redhat.com> <22543.1195055866@redhat.com> <335.1195128941@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, mhalcrow@us.ibm.com, phillip@hellewell.homeip.net, sfrench@samba.org To: David Howells Return-path: Received: from cantor2.suse.de ([195.135.220.15]:58437 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751778AbXKOViH (ORCPT ); Thu, 15 Nov 2007 16:38:07 -0500 Content-Disposition: inline In-Reply-To: <335.1195128941@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Nov 15, 2007 at 12:15:41PM +0000, David Howells wrote: > Nick Piggin wrote: > > > > So you're saying a struct page controls an area of PAGE_CACHE_SIZE, not an > > > area of PAGE_SIZE? > > > > No, a pagecache page is PAGE_CACHE_SIZE. > > That doesn't answer my question. I didn't ask about 'pagecache pages' per se. > > Are you saying then that a page struct always represents an area of PAGE_SIZE > to, say, the page allocator and PAGE_CACHE_SIZE to a filesystem's address > operations? Yes. > How about I state it this way: Please define what the coverage of a > (non-compound) struct page is, and how this relates to PAGE_SIZE and > PAGE_CACHE_SIZE. If it's well-defined then this cannot be hard, right? No it's easy. It's PAGE_SIZE (which also happens to be PAGE_CACHE_SIZE). An implementation that would (not trivially, but without changing the basic concepts) allow a larger pagecache size is with compound pages. And actually hugetlbfs already does this. > > And not all struct pages control the same amount of data anyway, with > > compound pages. > > Compound pages are irrelevant to my question. A compound page is actually a > regulated by a series of page structs, each of which represents a 'page' of > real memory. And it can also represent a PAGE_CACHE_SIZE page of pagecache. > Do you say, then, that all, say, readpage() and readpages() methods must > handle a compound page if that is given to them? I'm not talking about a specific implementation that allows PAGE_CACHE_SIZE > PAGE_SIZE. So no, I don't say anything about that. I say that pagecache pages are PAGE_CACHE_SIZE! Yes it is easy now because that is the same as PAGE_SIZE. Yes it will be harder if you wanted to change that. What you would not have to change is the assumption that pagecache pages are in PAGE_SIZE units.