login
Header Space

 
 

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

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Cc: Sage Weil <sage@...>, Christoph Hellwig <hch@...>, Brad Boyer <flar@...>, Anton Altaparmakov <aia21@...>, Gary Grider <ggrider@...>, <linux-fsdevel@...>
Date: Tuesday, December 5, 2006 - 6:26 am

On Dec 04, 2006  10:15 -0500, Trond Myklebust wrote:

I think the "barrier semantics" are something that have just crept
into this discussion and is confusing the issue.

The primary goal (IMHO) of this syscall is to allow the filesystem
(primarily distributed cluster filesystems, but HFS and NTFS developers
seem on board with this too) to avoid tens to thousands of stat RPCs in
very common ls -R, find, etc. kind of operations.

I can't see how fadvise() could help this case?  Yes, it would tell the
filesystem that it could do readahead of the readdir() data, but the
app will still be doing stat() on each of the thousands of files in the
directory, instantiating inodes and dentries on that node (which need
locking, and potentially immediate lock revocation if the files are
being written to by other nodes).  In some cases (e.g. rm -r, grep -r)
that might even be a win, because the client will soon be touching all
of those files, but not necessarily in the ls -lR, find cases.

The filesystem can't always do "stat-ahead" on the files because that
requires instantiating an inode on the client which may be stale (lock
revoked) by the time the app gets to it, and the app (and the VFS)  have
no idea just how stale it is, and whether the stat is a "real" stat or
"only" the readdir stat (because the fadvise would only be useful on
the directory, and not all of the child entries), so it would need to
re-stat the file.  Also, this would potentially blow the client's real
working set of inodes out of cache.

Doing things en-masse with readdirplus() also allows the filesystem to
do the stat() operations in parallel internally (which is a net win if
there are many servers involved) instead of serially as the application
would do.

Cheers, Andreas

PS - I changed the topic to separate this from the openfh() thread.
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

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