linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: David Howells <dhowells@redhat.com>,
	torvalds@osdl.org, steved@redhat.com, trond.myklebust@fys.uio.no,
	aviro@redhat.com, linux-fsdevel@vger.kernel.org,
	linux-cachefs@redhat.com, nfsv4@linux-nfs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 13/14] FS-Cache: Release page->private in failed readahead [try #8]
Date: Fri, 12 May 2006 17:23:18 +0100	[thread overview]
Message-ID: <1976.1147450998@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060512071100.5c5d52e9.akpm@osdl.org>

Andrew Morton <akpm@osdl.org> wrote:

> > 		SetPageLocked(page);
> 
> 	if (TestSetPagLocked(page))
> 		BUG();
> 
> would make me more comfortable..

That shouldn't be necessary if add_to_page_cache() also doesn't do that, but
if you wish, I can do that - it's the error handling path, so it doesn't
matter too much performancewise.

> > > For the second hunk, is it not possible to do this cleanup in the callback
> > > function?
> > 
> > Which callback function?
> 
> I was referring to the filler_t thingy.  Is it not possible to get control
> of that?

Well, the filler_t thing is generally a_ops->readpage from the caller fs, but
we don't want to call that if add_to_page_cache() failed, and we don't want to
call it if we're just discarding a bunch of pages we've now no intention of
actually reading.

I suppose we could add another callback for ditching pages we don't want to
keep.  This has the potential to be called quite a lot because of the way
readahead works on Linux.

> So please, can we have some comments in there which describe the new
> behaviour in a manner sufficient for a maintainer to follow so people don't
> break your stuff?

Okay... I'll add more comments.  I should probably also extend the
documentation on releasepage().  It won't be till Monday though.

> > Out of interest, why do we need PG_private to say there's something in
> > page->private?  Can't it just be assumed either that if page->private is
> > non-zero or that if a_ops->releasepage() is non-NULL, then we need to
> > "release" the page?
> 
> page->private is an unsigned long, not a pointer.  The core kernel hence
> cannot determine from its value whether or not it is live.  For example, the
> fs might choose to treat it as a bitmap of which-blocks-are-uptodate and
> which-blocks-are-dirty.

Then the second option is still possible (calling releasepage()
unconditionally).

David

  parent reply	other threads:[~2006-05-12 16:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 16:01 [PATCH 00/14] Permit filesystem local caching and NFS superblock sharing [try #8] David Howells
2006-05-10 16:01 ` [PATCH 01/14] NFS: Permit filesystem to override root dentry on mount " David Howells
2006-05-10 16:01 ` [PATCH 02/14] NFS: Permit filesystem to perform statfs with a known root dentry " David Howells
2006-05-10 16:01 ` [PATCH 03/14] NFS: Abstract out namespace initialisation " David Howells
2006-05-10 16:01 ` [PATCH 04/14] NFS: Add dentry materialisation op " David Howells
2006-05-10 16:01 ` [PATCH 07/14] FS-Cache: Provide a filesystem-specific sync'able page bit " David Howells
2006-05-10 16:01 ` [PATCH 08/14] FS-Cache: Add notification of page becoming writable to VMA ops " David Howells
2006-05-10 16:01 ` [PATCH 09/14] FS-Cache: Avoid ENFILE checking for kernel-specific open files " David Howells
2006-05-10 16:01 ` [PATCH 11/14] FS-Cache: Make kAFS use FS-Cache " David Howells
2006-05-10 16:01 ` [PATCH 13/14] FS-Cache: Release page->private in failed readahead " David Howells
2006-05-11 17:40   ` Andrew Morton
2006-05-12 12:34   ` David Howells
2006-05-12 14:11     ` Andrew Morton
2006-05-12 16:23     ` David Howells [this message]
2006-05-10 16:01 ` [PATCH 14/14] NFS: Use local caching " David Howells
     [not found] ` <20060510160132.9058.35796.stgit@warthog.cambridge.redhat.com>
2006-05-10 16:23   ` [PATCH 06/14] NFS: Share NFS superblocks per-protocol per-server per-FSID " Christoph Hellwig
2006-05-10 16:44   ` David Howells
2006-05-12 10:51 ` [PATCH 02/14] NFS: Permit filesystem to perform statfs with a known root dentry [try #9] David Howells
2006-05-15  5:46   ` Nathan Scott
2006-05-12 12:49 ` [PATCH 13/14] FS-Cache: Release page->private in failed readahead " David Howells

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=1976.1147450998@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=aviro@redhat.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfsv4@linux-nfs.org \
    --cc=steved@redhat.com \
    --cc=torvalds@osdl.org \
    --cc=trond.myklebust@fys.uio.no \
    /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;
as well as URLs for NNTP newsgroup(s).