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: Wednesday, December 6, 2006 - 6:28 am

On Dec 05, 2006  10:23 -0500, Trond Myklebust wrote:

Actually, wouldn't the ability for readdirplus() (with valid flag) be
useful for NFS if only to indicate that it does not need to flush the
cache because the ctime/mtime isn't needed by the caller?


It does in any but the most simplistic invocations, like "find -mtime"
or "find -mode" or "find -uid", etc.


I guess I just don't understand how fadvise() on a directory file handle
(used for readdir()) can be used to affect later stat operations (which
definitely will NOT be using that file handle)?  If you mean that the
application should actually open() each file, fadvise(), fstat(), close(),
instead of just a stat() call then we are WAY into negative improvements
here due to overhead of doing open+close.


Most clustered filesystems have strong cache semantics, so that isn't
a problem.  IMHO, the mechanism to pass the hint to the filesystem IS
the readdirplus_lite() that tells the filesystem exactly which data is
needed on each directory entry.


Because in many cases it is desirable to limit the number of DLM locks
on a given client (e.g. GFS2 thread with AKPM about clients with
millions of DLM locks due to lack of memory pressure on large mem systems).
That means a finite-size lock LRU on the client that risks being wiped
out by a few thousand files in a directory doing "readdir() + 5000*stat()".


Consider a system like BlueGene/L with 128k compute cores.  Jobs that
run on that system will periodically (e.g. every hour) create up to 128K
checkpoint+restart files to avoid losing a lot of computation if a node
crashes.  Even if each one of the checkpoints is in a separate directory
(I wish all users were so nice :-) it means 128K inodes+DLM locks for doing
an "ls" in the directory.


But it would still need 128K RPCs to get that information, and 128K new
inodes on that client.  And what is the chance that I can get a
multi-threading "ls" into the upstream GNU ls code?  In the case of local
filesystems multi-threading ls would be a net loss due to seeking.

But even for local filesystems readdirplus_lite() would allow them to
fill in stat information they already have (either in cache or on disk),
and may avoid doing extra work that isn't needed.  For filesystems that
don't care, readdirplus_lite() can just be readdir()+stat() internally.

Cheers, Andreas
--
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