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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]