From: Andrew Morton <akpm@linux-foundation.org>
To: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] VFS: Pagecache usage optimization on pagesize != blocksize environment
Date: Wed, 21 May 2008 00:38:49 -0700 [thread overview]
Message-ID: <20080521003849.0aabac4b.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080521001930.202446eb.akpm@linux-foundation.org>
On Wed, 21 May 2008 00:19:30 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> I guess a suitable fix might be to implement the above using a new
> address_space_operations callback:
>
> if (PagePrivate(page) && aops->is_partially_uptodate) {
This is a bit presumptuous. A filesytem could in theory be able to
work out if a section of a page is uptodate without necessarily
maintaining per-page metadata at page.private.
So one really should just do
if (aops->is_partially_uptodate)
however it's hard to conceive how a filesystem could sanely do this
_without_ putting data at page.private, so the PagePrivate() test could
perhaps be retained as a microoptimisation, as long as it is suitably
commented.
otoh, non-zero aops->is_partially_uptodate might well be less common
than non-zero PagePrivate(), so perhaps these should be tested in the
other order. Not sure.
> if (aops->is_partially_uptodate(page, desc, offset))
> <OK, we can copy the data>
>
> then implement a generic_file_is_partially_uptodate() in fs/buffer.c
Make that block_is_partially_uptodate().
> and wire that up in the filesystems.
>
> Note that things like network filesystems can then implement this also.
next prev parent reply other threads:[~2008-05-21 7:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 6:52 [PATCH] VFS: Pagecache usage optimization on pagesize != blocksize environment Hisashi Hifumi
2008-05-21 7:19 ` Andrew Morton
2008-05-21 7:38 ` Andrew Morton [this message]
2008-05-22 7:31 ` [PATCH] VFS: Pagecache usage optimization on pagesize !=blocksize environment Hisashi Hifumi
2008-05-22 8:03 ` Andrew Morton
2008-05-22 12:08 ` [PATCH] VFS: Pagecache usage optimization on pagesize!=blocksize environment Hisashi Hifumi
2008-05-23 22:51 ` [PATCH] VFS: Pagecache usage optimization on pagesize !=blocksize environment Jan Kara
2008-05-26 7:20 ` Hisashi Hifumi
2008-05-26 11:40 ` Jan Kara
2008-05-27 8:38 ` [PATCH] VFS: Pagecache usage optimization on pagesize!=blocksize environment Hisashi Hifumi
2008-05-27 8:51 ` Andrew Morton
2008-05-27 9:34 ` [PATCH] VFS: Pagecache usage optimization onpagesize!=blocksize environment Hisashi Hifumi
2008-05-28 23:23 ` Andrew Morton
2008-06-10 1:52 ` [PATCH] VFS: Pagecache usage optimization onpagesize!=blocksizeenvironment Hisashi Hifumi
2008-07-11 23:39 ` [PATCH] VFS: Pagecache usage optimization onpagesize!=blocksize environment Andrew Morton
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=20080521003849.0aabac4b.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hifumi.hisashi@oss.ntt.co.jp \
--cc=linux-kernel@vger.kernel.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