On Thu, 2023-11-16 at 12:17 -0500, Benjamin Coddington wrote: > On 16 Nov 2023, at 12:11, Benjamin Coddington wrote: > > > I ran into this old problem again recently, last discussed here: > > https://lore.kernel.org/linux-nfs/F738DB31-B527-4048-94A7-DBF00533F8C1@xxxxxxxxxx/#t > > > > Problem is that clients can easily issue enough WRITEs that end up in > > > > __break_lease > > xfs_break_leased_layouts > > ... > > nfsd_vfs_write > > ... > > svc_process > > svc_recv > > nfsd > > > > .. so that all the knfsds are there, and nothing can process the > > LAYOUTRETURN. > > > > I'm pretty sure we can make the linux client a bit smarter about it (I saw > > one LAYOUTGET and one conflicting WRITE in the same TCP segment, in that > > order). > > Actually, I can't imagine any block/SCSI/NVMe server implementation that > would be fine with a client writing to the device at the same time the server > does, and so why shouldn't the client preemptively return the layout? > > Ben > That may be, but I don't think we can rely on that from the server-side. I know that Neil and Chuck were discussing spinning up more nfsd threads dynamically as required. That may be the best fix for this sort of problem. Until then, the guidance should probably be to start a _lot_ of threads if you're running a pNFS SCSI enabled nfsd server. -- Jeff Layton <jlayton@xxxxxxxxxx>