Re: [Cluster-devel] [RFC] readdirplus implementations: xgetdents vs dirreadahead syscalls

From: Trond Myklebust
Date: Fri Jul 25 2014 - 16:30:37 EST

On Fri, Jul 25, 2014 at 4:02 PM, Steven Whitehouse <swhiteho@xxxxxxxxxx> wrote:
> Hi,
> On 25/07/14 19:28, Zach Brown wrote:
>> How do the file systems that implement directory read-ahead today deal
>> with this?
> I don't know of one that does - or at least readahead of the directory info
> itself is one thing (which is relatively easy, and done by many file
> systems) its reading ahead the inodes within the directory which is more
> complex, and what we are talking about here.

NFS looks at whether or not there are lookup revalidations and/or
getattr calls in between the calls to readdir(). If there are, then we
assume an 'ls -l' workload, and continue to issue readdirplus calls to
the server.

Note that we also actively zap the readdir cache if we see getattr
calls over the wire, since the single call to readdirplus is usually
very much more efficient.

Trond Myklebust

Linux NFS client maintainer, PrimaryData

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at