Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15

Re: [PATCH 3/3] Avoid doing extra 'lstat()'s for d_type if we have an up-to-date cache entry

From: Dmitry Potapov <hidden>
Date: 2016-06-15 22:47:02

On Wed, Jul 08, 2009 at 07:43:50PM -0700, Linus Torvalds wrote:
On filesystems without d_type, we can look at the cache entry first.
Doing an lstat() can be expensive.

Reported by Dmitry Potapov for Cygwin.
I have tested it on Cygwin. The number of 'stat' for files is now 1, so
it works fine :)

I still have the same large number of 'stat' calls for directories, but I
suspect that due to that due to some Cygwin specific. I will investigate
that issue later when I have more time.

Because the repositoty on which I did testing has too many directories
(one directory per each 3.5 files) the effect was not as prominent as
it would be otherwise. Yet, it is 24.9% decrease of the number of 'stat'
or 14.8% descreased of the total number of syscalls. And my measurement
shows 14% descrease of run-time. So, it appears that on Windows the run
time almost directly proportional of the total number of syscalls...

BTW, I believe that this patch should help MinGW too, because AFAIK
MinGW does not have d_type either.


Thanks,
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help