Re: [for-6.16-final PATCH 9/9] nfs/localio: add localio_async_probe modparm

Mike Snitzer
2025-07-14T14:08:49Z

On Mon, Jul 14, 2025 at 08:28:22AM -0400, Jeff Layton wrote:
> On Mon, 2025-07-14 at 14:23 +1000, NeilBrown wrote:
> > On Mon, 14 Jul 2025, Mike Snitzer wrote:
> > > From: Mike Snitzer <snitzer@hammerspace.com>
> > >
> > > This knob influences the LOCALIO handshake so that it happens
> > > synchronously upon NFS client creation.. which reduces the window of
> > > opportunity for a bunch of IO to flood page cache and send out over to
> > > NFSD before LOCALIO handshake negotiates that the client and server
> > > are local. The knob is:
> > > echo N > /sys/module/nfs/parameters/localio_async_probe
> >
> > I understand why you are adding this but .... yuck. Tuning knobs are
> > best avoided.
> >
> > Maybe we could still do the probe async, but in mount wait for 200ms,
> > or for the probe to get a reply. That should make everyone happy.
> >
> > NeilBrown
> >
>
> Agreed. I'd prefer to not need a tuning knob for this. Doing a short
> wait in the mount for localio negotiation would be a lot more
> reasonable.

OK.

> That said, why is the LOCALIO negotiation taking so long? Shouldn't
> that be basically instantaneous during the mount? Do we really have
> applications that are hammering reads and writes just after the mount
> returns but before the localio negotiation completes?

Yes, buffered IO in particular brings the hammer via a storm of page
cache IO that takes a while to be complete before LOCALIO ever gets an
opportunity to service NFS client IO.

Mike