All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>
Cc: "schumakeranna@gmail.com" <schumakeranna@gmail.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] sunrpc: convert unnecessary GFP_ATOMIC to GFP_NOFS
Date: Fri, 21 Dec 2018 06:37:27 +0000	[thread overview]
Message-ID: <367f28cedc86e955be2206ed31f8da5dff6533bf.camel@hammerspace.com> (raw)
In-Reply-To: <20181220155219.GD6063@fieldses.org>

On Thu, 2018-12-20 at 10:52 -0500, Bruce Fields wrote:
> On Thu, Dec 20, 2018 at 10:47:25AM -0500, Chuck Lever wrote:
> > 
> > > On Dec 20, 2018, at 10:42 AM, J. Bruce Fields <
> > > bfields@fieldses.org> wrote:
> > > 
> > > From: "J. Bruce Fields" <bfields@redhat.com>
> > > 
> > > It's OK to sleep here, we just don't want to recurse into the
> > > filesystem
> > > as this writeout could be waiting on this.
> > 
> > "as a writeout"
> 
> Oops, thanks.
> 
> > > Future work: the documentation for GFP_NOFS says "Please try to
> > > avoid
> > > using this flag directly and instead use
> > > memalloc_nofs_{save,restore} to
> > > mark the whole scope which cannot/shouldn't recurse into the FS
> > > layer
> > > with a short explanation why. All allocation requests will
> > > inherit
> > > GFP_NOFS implicitly."
> > > 
> > > But I'm not sure where to do this.  Should the workqueue be
> > > arranging
> > > that for us in the case of workqueues created with
> > > WQ_MEM_RECLAIM?
> > 
> > There seem to be plenty of uses of GFP_NOFS in NFS and sunrpc.
> > That sounds like a big project.
> 
> Yeah, just noting it for future reference.
> 

I'd suggest that we can probably just call memalloc_nofs_save() in
rpc_execute(), and otherwise in those workqueue callback functions that
are executed directly by rpciod and xprtiod. That doesn't make for too
many callsites.


-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



      parent reply	other threads:[~2018-12-21  6:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 15:35 [PATCH] sunrpc: handle ENOMEM in rpcb_getport_async J. Bruce Fields
2018-12-20 15:42 ` [PATCH] sunrpc: convert unnecessary GFP_ATOMIC to GFP_NOFS J. Bruce Fields
2018-12-20 15:47   ` Chuck Lever
2018-12-20 15:52     ` Bruce Fields
2018-12-20 20:13       ` Bruce Fields
2018-12-21  6:37       ` Trond Myklebust [this message]

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=367f28cedc86e955be2206ed31f8da5dff6533bf.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=schumakeranna@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.