Re: readdirplus() as possible POSIX I/O API

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Trond Myklebust
Date: Wednesday, December 6, 2006 - 8:10 am

On Wed, 2006-12-06 at 03:28 -0700, Andreas Dilger wrote:

That is why statlite() might be useful. I'd prefer something more
generic, though.


The only 'win' a readdirplus may give you there as far as NFS is
concerned is the sysenter overhead that you would have for calling
stat() (or statlite() many times).


On the contrary, the readdir descriptor is used in all those funky new
statat(), calls. Ditto for readlinkat(), faccessat().

You could even have openat() turn off the close-to-open GETATTR if the
readdir descriptor contained a hint that told it that was unnecessary.

Furthermore, since the fadvise-like caching operation works on
filehandles, you could have it work both on readdir() for the benefit of
the above *at() calls, and also on the regular file descriptor for the
benefit of fstat(), fgetxattr().


That is precisely the sort of situation where knowing when you can
cache, and when you cannot would be a plus. An ls call may not need 128k
dlm locks, because it only cares about the state of the inodes as they
were at the start of the opendir() call.


NFS doesn't 'cos it implements readdirplus under the covers as far as
userland is concerned.


The thing to note, though, is that in the NFS implementation we are
_very_ careful about use the GETATTR information it returns if there is
already an inode instantiated for that dentry. This is precisely because
we don't want to deal with the issue of synchronisation w.r.t. an inode
that may be under writeout, that may be the subject of setattr() calls,
etc. As far as we're concerned, READDIRPLUS is a form of mass LOOKUP,
not a mass inode revalidation

Trond

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
NFSv4/pNFS possible POSIX I/O API standards, Gary Grider, (Mon Nov 27, 9:34 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Mon Nov 27, 10:54 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Tue Nov 28, 3:54 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Anton Altaparmakov, (Tue Nov 28, 4:28 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Tue Nov 28, 8:08 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Russell Cattelan, (Tue Nov 28, 1:17 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Wendy Cheng, (Tue Nov 28, 4:28 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Brad Boyer, (Wed Nov 29, 1:26 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 2:04 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 2:12 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 2:14 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Wed Nov 29, 2:48 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Anton Altaparmakov, (Wed Nov 29, 3:18 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Steven Whitehouse, (Wed Nov 29, 3:25 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Wed Nov 29, 5:23 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Wed Nov 29, 5:35 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 5:39 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Gary Grider, (Wed Nov 29, 9:26 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 10:18 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Thu Nov 30, 2:25 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Thu Nov 30, 5:29 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Thu Nov 30, 10:49 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Thu Nov 30, 10:26 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Fri Dec 1, 12:08 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Fri Dec 1, 7:41 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ric Wheeler, (Fri Dec 1, 8:52 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Fri Dec 1, 9:47 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Fri Dec 1, 11:07 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Fri Dec 1, 11:42 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Fri Dec 1, 12:13 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Fri Dec 1, 1:32 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Fri Dec 1, 3:29 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Fri Dec 1, 7:35 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Sat Dec 2, 6:52 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Sat Dec 2, 6:57 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Sun Dec 3, 9:10 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Mon Dec 4, 12:32 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Mon Dec 4, 8:15 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Peter Staubach, (Mon Dec 4, 11:02 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Mon Dec 4, 5:37 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Mon Dec 4, 5:59 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Gary Grider, (Mon Dec 4, 9:44 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Mon Dec 4, 10:56 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:02 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:05 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:07 am)
Re: readdirplus() as possible POSIX I/O API, Andreas Dilger, (Tue Dec 5, 3:26 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Tue Dec 5, 7:20 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Peter Staubach, (Tue Dec 5, 7:37 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Tue Dec 5, 7:55 am)
Re: readdirplus() as possible POSIX I/O API, Trond Myklebust, (Tue Dec 5, 8:23 am)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Tue Dec 5, 9:47 am)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Tue Dec 5, 9:55 am)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Tue Dec 5, 10:01 am)
Re: Re: readdirplus() as possible POSIX I/O API, Latchesar Ionkov, (Tue Dec 5, 10:06 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Tue Dec 5, 2:44 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Peter Staubach, (Tue Dec 5, 2:50 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Tue Dec 5, 2:50 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:05 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Tue Dec 5, 3:11 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:12 pm)
Re: readdirplus() as possible POSIX I/O API, Rob Ross, (Tue Dec 5, 3:48 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Tue Dec 5, 4:18 pm)
Re: readdirplus() as possible POSIX I/O API, Sage Weil, (Tue Dec 5, 4:20 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Tue Dec 5, 4:24 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Tue Dec 5, 4:55 pm)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, David Chinner, (Wed Dec 6, 2:48 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Wed Dec 6, 3:06 am)
Re: readdirplus() as possible POSIX I/O API, Andreas Dilger, (Wed Dec 6, 3:28 am)
openg, Christoph Hellwig, (Wed Dec 6, 4:01 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Wed Dec 6, 8:04 am)
Re: readdirplus() as possible POSIX I/O API, Trond Myklebust, (Wed Dec 6, 8:10 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Wed Dec 6, 8:14 am)
Re: openg, Trond Myklebust, (Wed Dec 6, 8:41 am)
Re: openg, Rob Ross, (Wed Dec 6, 8:42 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Wed Dec 6, 8:44 am)
Re: readdirplus() as possible POSIX I/O API, Peter Staubach, (Wed Dec 6, 8:48 am)
openg and path_to_handle, Rob Ross, (Wed Dec 6, 8:53 am)
Re: openg and path_to_handle, Matthew Wilcox, (Wed Dec 6, 9:04 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Wed Dec 6, 9:15 am)
Re: openg and path_to_handle, Rob Ross, (Wed Dec 6, 9:20 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Wed Dec 6, 9:42 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Wed Dec 6, 10:19 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Wed Dec 6, 10:27 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Wed Dec 6, 10:42 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ragnar , (Wed Dec 6, 11:01 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Wed Dec 6, 11:13 am)
Re: openg and path_to_handle, David Chinner, (Wed Dec 6, 1:40 pm)
Re: openg and path_to_handle, Matthew Wilcox, (Wed Dec 6, 1:50 pm)
Re: openg and path_to_handle, Rob Ross, (Wed Dec 6, 1:50 pm)
Re: openg and path_to_handle, David Chinner, (Wed Dec 6, 1:57 pm)
Re: openg and path_to_handle, David Chinner, (Wed Dec 6, 2:01 pm)
Re: openg and path_to_handle, David Chinner, (Wed Dec 6, 2:09 pm)
Re: openg and path_to_handle, Andreas Dilger, (Wed Dec 6, 3:09 pm)
Re: openg and path_to_handle, Matthew Wilcox, (Wed Dec 6, 3:17 pm)
Re: openg and path_to_handle, Andreas Dilger, (Wed Dec 6, 3:41 pm)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Wed Dec 6, 4:12 pm)
Re: openg and path_to_handle, Latchesar Ionkov, (Wed Dec 6, 4:19 pm)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Wed Dec 6, 4:25 pm)
Re: openg, Christoph Hellwig, (Wed Dec 6, 4:32 pm)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Wed Dec 6, 4:33 pm)
Re: openg and path_to_handle, Christoph Hellwig, (Wed Dec 6, 4:39 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Wed Dec 6, 10:57 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Nikita Danilov, (Thu Dec 7, 4:39 pm)
Re: openg and path_to_handle, Rob Ross, (Thu Dec 14, 2:00 pm)
Re: openg and path_to_handle, Matthew Wilcox, (Thu Dec 14, 2:20 pm)
Re: openg and path_to_handle, Rob Ross, (Thu Dec 14, 3:52 pm)
Re: openg and path_to_handle, Rob Ross, (Thu Dec 14, 4:02 pm)
Re: openg, Rob Ross, (Thu Dec 14, 4:36 pm)
statlite(), Rob Ross, (Thu Dec 14, 4:58 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Fri Dec 15, 3:37 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Sat Dec 16, 11:13 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Sat Dec 16, 12:08 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ragnar , (Sun Dec 17, 7:41 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Sun Dec 17, 12:07 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Sun Dec 17, 12:38 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Sun Dec 17, 2:51 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ragnar , (Sun Dec 17, 7:57 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Gary Grider, (Sun Dec 17, 8:54 pm)