Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: David Howells <dhowells@redhat.com>
Cc: Benny Halevy <bhalevy@panasas.com>,
	torvalds@osdl.org, linux-arch@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: Should PAGE_CACHE_SIZE be discarded?
Date: Thu, 15 Nov 2007 22:30:51 +0100	[thread overview]
Message-ID: <20071115213051.GA30158@wotan.suse.de> (raw)
In-Reply-To: <26150.1195138006@redhat.com>

On Thu, Nov 15, 2007 at 02:46:46PM +0000, David Howells wrote:
> Benny Halevy <bhalevy@panasas.com> wrote:
> 
> > I think that what Nick was trying to say is that PAGE_CACHE_SIZE should
> > always be used properly as the size of the memory struct Page covers (while
> > PAGE_SIZE is the hardware page size and the constraint is that
> > PAGE_CACHE_SIZE == (PAGE_SIZE << k) for some k >= 0).  If everybody does
> > that then "None of the filesystems should really care at all". That said, it
> > doesn't seem like the current usage in fs/ and drivers/ is consistent with
> > this convention.
> 
> Indeed.  One thing you have to consider is kmap().  I would expect it to
> present an area of PAGE_SIZE for access.  However, if the filesystem gets an
> area of PAGE_CACHE_SIZE to fill, then I would have to do multiple kmap() calls
> in the process of filling that 'pagecache page' in AFS.
> 
> Furthermore, if a page struct covers a PAGE_CACHE_SIZE chunk of memory, then I
> suspect the page allocator is also wrong, as it I believe it deals with
> PAGE_SIZE chunks of memory, assuming a struct page for each.

That's because you're thinking about all these difficulties outside the
filesystem. Really, pagecache is in PAGE_CACHE_SIZE. Nobody said pagecache
> PAGE_SIZE will work by changing a single define, but filesystems are
about the least problematic here.

  reply	other threads:[~2007-11-15 21:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-14 13:56 Should PAGE_CACHE_SIZE be discarded? David Howells
2007-11-14 15:23 ` Nick Piggin
2007-11-14 15:59   ` David Howells
2007-11-14 21:35     ` Nick Piggin
2007-11-15 12:05       ` David Howells
2007-11-15 14:15         ` Benny Halevy
2007-11-15 14:46           ` David Howells
2007-11-15 21:30             ` Nick Piggin [this message]
2007-11-15 17:09 ` Jörn Engel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071115213051.GA30158@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=bhalevy@panasas.com \
    --cc=dhowells@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox