public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Steve Dickson <SteveD@redhat.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] VM: Fix the gfp_mask in invalidate_complete_page2
Date: Fri, 6 Oct 2006 19:33:11 -0700	[thread overview]
Message-ID: <20061006193311.a2916dff.akpm@osdl.org> (raw)
In-Reply-To: <4526E229.2020707@RedHat.com>

On Fri, 06 Oct 2006 19:09:29 -0400
Steve Dickson <SteveD@redhat.com> wrote:

> > 
> > It's not 100% clear what the gfp_t _means_ in the try_to_release_page()
> > context.  Callees will rarely want to allocate memory (true?).  So it
> > conveys two concepts: 
> > 
> > a) can sleep. (__GFP_WAIT).  That's fairly straightforward
> > 
> > b) can take fs locks (__GFP_FS).  This is less clear.  By passing down
> >    __GFP_FS we're telling the callee that it's OK to take i_mutex, even
> >    lock_page().  That sounds pretty unsafe in this context, particularly
> >    the latter, as we're already holding a page lock.
> > 
> > So perhaps the safer and more appropriate solution here is to pass in a
> > bare __GFP_WAIT.
> I agree... __GFP_WAIT does seem to be a bit more straightforward...
> either way is find.. as long as it cause NFS to flush its pages...

Except NFS looks at __GFP_FS, so __GFP_WAIT won't help.

Oh well.  Passing __GFP_FS in here sort-of implies that it's OK to run
lock_page(), but if a ->releasepage() impementation tries to lock the page
it's passed then it needs its head read.

I made it GFP_KERNEL.

  parent reply	other threads:[~2006-10-07  2:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06 21:37 [PATCH] VM: Fix the gfp_mask in invalidate_complete_page2 Trond Myklebust
2006-10-06 21:49 ` Steve Dickson
2006-10-06 22:16   ` Trond Myklebust
2006-10-06 22:19     ` Trond Myklebust
2006-10-06 22:40       ` Andrew Morton
2006-10-06 23:09         ` Steve Dickson
2006-10-06 23:20           ` Andrew Morton
2006-10-07  2:33           ` Andrew Morton [this message]
2006-10-10  9:43 ` David Howells
2006-10-10 11:42   ` Trond Myklebust
2006-10-10 12:18     ` Steve Dickson
2006-10-10 12:27       ` Trond Myklebust
2006-10-10 13:22         ` Steve Dickson
2006-10-10 13:32           ` Trond Myklebust
2006-10-10 12:49     ` David Howells
2006-10-10 13:15       ` Trond Myklebust

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=20061006193311.a2916dff.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=SteveD@redhat.com \
    --cc=Trond.Myklebust@netapp.com \
    --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