All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: NeilBrown <neilb@suse.de>
Cc: Dave Chinner <david@fromorbit.com>,
	Trond Myklebust <trondmy@hammerspace.com>,
	Chuck Lever <chuck.lever@oracle.com>,
	linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: sporadic hangs on generic/186
Date: Wed, 6 Apr 2022 21:49:39 -0400	[thread overview]
Message-ID: <20220407014939.GC1242@fieldses.org> (raw)
In-Reply-To: <164929437439.10985.5253499040284089154@noble.neil.brown.name>

On Thu, Apr 07, 2022 at 11:19:34AM +1000, NeilBrown wrote:
> I had a look through the various places where alloc can now fail.
> 
> I think xdr_alloc_bvec() in xprt_sent_pagedata() is the most likely
> cause of a problem here.  I don't think an -ENOMEM from there is caught,
> so it could likely filter up to NFS and result in the message you got.
> 
> I don't think we can easily handle failure there.  We need to stay with
> GFP_KERNEL rely on PF_MEMALLOC to make forward progress for
> swap-over-NFS.
> 
> Bruce: can you change that one line back to GFP_KERNEL and see if the
> problem goes away?

Like this?  Sure--might take me a day or two to run the tests and get
results back.--b.

diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c
index 05b38bf68316..506627dc9a0f 100644
--- a/net/sunrpc/socklib.c
+++ b/net/sunrpc/socklib.c
@@ -223,7 +223,7 @@ static int xprt_send_pagedata(struct socket *sock, struct msghdr *msg,
 {
 	int err;
 
-	err = xdr_alloc_bvec(xdr, rpc_task_gfp_mask());
+	err = xdr_alloc_bvec(xdr, GFP_KERNEL);
 	if (err < 0)
 		return err;
 

  reply	other threads:[~2022-04-07  1:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 19:54 sporadic hangs on generic/186 J. Bruce Fields
2022-04-06 19:58 ` Chuck Lever III
2022-04-07  0:14 ` Dave Chinner
2022-04-07  0:27   ` NeilBrown
2022-04-07  1:19     ` NeilBrown
2022-04-07  1:49       ` J. Bruce Fields [this message]
2022-04-07  4:23         ` NeilBrown
2022-04-07  1:54       ` Trond Myklebust
2022-04-07  4:11         ` NeilBrown
2022-04-07 13:01           ` Trond Myklebust
2022-04-08  2:46             ` NeilBrown
2022-04-08  5:03               ` Dave Chinner
2022-04-08  5:32                 ` NeilBrown
2022-04-10 23:34                   ` Dave Chinner
2022-04-12  3:13                     ` NeilBrown

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=20220407014939.GC1242@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=trondmy@hammerspace.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.