On 20 Sep 2022, at 13:00, Benjamin Coddington wrote: > Since commit 1a34c8c9a49e ("NFS: Support larger readdir buffers") has > updated dtsize, and with recent improvements to the READDIRPLUS helper > heuristic, the heuristic may not trigger until many dentries are emitted > to userspace. This will cause many thousands of GETATTR calls for "ls > -l" when the directory's pagecache has already been populated. This > manifests as poor performance for long directory listings after an > initially fast "ls -l". > > Fix this by emitting only 17 entries for any first pass through the NFS > directory's ->iterate_shared(), which allows userpace to prime the > counters for the heuristic. > > Signed-off-by: Benjamin Coddington <bcodding@xxxxxxxxxx> > --- Hello Trond and Anna, please consider this patch. We have folks that are sad and confused that "ls -l" becomes much slower after running it once. Olga also tested this fix and reported performance gains here: https://lore.kernel.org/linux-nfs/CAN-5tyFsJy-D9cEfk8zCH8-0KErWteVW8Zb7BMqjL7==2qtT_A@xxxxxxxxxxxxxx/ Olga, would you be willing to contribute your "Tested-by" for this patch? Any comments from anyone would also be welcome. Ben