lkml.org 
[lkml]   [1999]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: structure dentry help...
Theodore Y. Ts'o wrote:
> Do you remember the patch to speed up `open (fn, O_DIRECTORY)'
> by avoiding inode reads for non-directories? Your tune2fs feature is
> the step that makes that patch effective. I will try it on a real
> filesystem soon, and see how much faster treescan runs.
>
> P.S. It would be good to make the user code check the de_type field
> returned from readdir(), and not try the open(fn, O_DIRECTORY) call if
> de_type is set. That way, it will be ready for when we get the full
> readdir() implementation done, since while the open(O_DIRECTORY) is a
> neat hack, it still involves a system call which could be avoided if we
> passed the information back in readdir().

Isn't it nice that I do that already in treescan :-)

However it doesn't take effect because I call the getdents system call
directly instead of calling Glibc getdirentries, and getdents does not
return a d_type field. Glibc's getdirentries does some extra, redundant
system calls and subsequent data shuffling. The overhead is measurable,
but not very significant in the scheme of things.

If the new system call simply implements Glibc's getdirentries, so that
Glibc will eventually be efficient, I will make the new version of
treescan always use getdirentries on the assumption that the binary is
ready to take advantage of the new kernel capability even when compiled
on older kernels.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.096 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site