Messages in this thread | | | Date | Mon, 28 Apr 2008 09:31:30 -0400 | From | Theodore Tso <> | Subject | Re: stat benchmark |
| |
On Mon, Apr 28, 2008 at 02:59:26PM +0300, Avi Kivity wrote: > > A readdirplus() could sort the inodes according to the filesystem's layout, > and additionally issue the stats in parallel, so if you have multiple > spindles you get significant additional speedup. >
Well, sorting inodes is something readdir() could do, but it takes potentially an unbounded amount of (non-swappable) kernel memory. That's why it's messy.
And it wouldn't be hard to have flags (set by fcntl()) on the fd returned by readdir() which which requests inode cache prefetching, which would have the same net result, without needing to design a new system call. So before designing a new system call, it might be worth it to do some benchmarks to see how much of the cost is really in the number of stat() system calls, in the warm cache case.
- Ted
| |