Linux NFS development
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@kernel.org>
To: NeilBrown <neil@brown.name>
Cc: Harshvardhan Jha <harshvardhan.j.jha@oracle.com>,
	Anna Schumaker	 <anna@kernel.org>,
	Mark Brown <broonie@kernel.org>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH] sunrpc: don't fail immediately in rpc_wait_bit_killable()
Date: Fri, 05 Sep 2025 19:16:22 -0400	[thread overview]
Message-ID: <fbbebc3de6c6d505a0590c1323dfe134d338a74d.camel@kernel.org> (raw)
In-Reply-To: <175711230465.2850467.14720425360212114773@noble.neil.brown.name>

On Sat, 2025-09-06 at 08:45 +1000, NeilBrown wrote:
> On Sat, 06 Sep 2025, Trond Myklebust wrote:
> > On Thu, 2025-08-28 at 18:12 +0530, Harshvardhan Jha wrote:
> > > Is it possible to get this merged in 6.17? I have tested this and
> > > the
> > > LTP tests pass.
> > 
> > After much thought, I think I'd rather just revert the commit that
> > caused the issue. I'll work on an alternative for the 6.18
> > timeframe
> > instead.
> 
> That seems reasonable - thanks.  I'd be curious to know what the
> original issue was.  I'm guess it was CLOSE blocking ??
> 

A customer of ours was seeing the NFS flush-on-close hanging after the
process itself had been killed. So the patch was really intended to
address the problem of signalled threads. The fact that it also
affected ordinary processes that rely on exit() to close the file
descriptors was due to a brain fart on my part.

> If you do revert, would you consider the following?  I wrote it a
> while
> ago but it became irrelevant with the patch that you might now
> revert.
> 
> I wonder if it would make sense for some part of bit_wait() (or
> rpc_wait_bit_killable()) to warn if waiting in TASK_KILLABLE when
> PF_EXITING is set.

What I've been thinking is that for a process in the PF_EXITING state,
we might automatically set RPC_TASK_TIMEOUT on any new RPC calls. The
main problem with that is that it could cause loss of data, since
ETIMEDOUT is a fatal error. So perhaps a new flag similar to
RPC_TASK_TIMEDOUT, but that instead sets EINTR?

The reason for doing that rather than changing the wait, is that when
everything is working correctly, we might want to allow the exiting
process to wait for a very large file flush to complete. It's only when
the RPC calls themselves start to hang due to the server being
unavailable, that we want to actually pull the plug.

> 
> Thanks,
> NeilBrown
> 

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

      reply	other threads:[~2025-09-05 23:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 21:38 [PATCH] sunrpc: don't fail immediately in rpc_wait_bit_killable() NeilBrown
2025-08-28 12:42 ` Harshvardhan Jha
2025-08-28 13:10   ` Trond Myklebust
2025-08-29  1:04     ` NeilBrown
2025-09-05 19:38   ` Trond Myklebust
2025-09-05 22:45     ` NeilBrown
2025-09-05 23:16       ` 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=fbbebc3de6c6d505a0590c1323dfe134d338a74d.camel@kernel.org \
    --to=trondmy@kernel.org \
    --cc=anna@kernel.org \
    --cc=broonie@kernel.org \
    --cc=harshvardhan.j.jha@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    /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