This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Followup on eliminating symlink ReadFile calls -- it's not necessary


On Wed, Feb 14, 2001 at 12:46:08PM -0500, Jonathan Kamens wrote:
>DJ Delorie suggested using "mount -x" to eliminate the ReadFile for
>determining whether a file is executable, and adding a new mount
>option to indicate that there are no symbolic links under a particular
>mountpoint, to eliminate the other ReadFile.
>
>I implemented his suggestion, adding a "-l" flag and a corresponding
>MOUNT_NO_SYMLINKS flag, and did some performance testing on the
>result.  I was surprise to discover that mounting with this option
>didn't provide any additional performance improvement over "-x".

Actually, I suggested this.

>This inspired me to do a more careful reading of the code, at which
>point I noticed what I should have noticed before -- the ReadFile to
>check for a symbolic link doesn't happen unless the system attribute
>is set on a file.  In other words, the performance hit we were seeing
>in Make was due entirely to the ReadFile checking for executability,
>NOT to the ReadFile checking for symbolic links.

I also mentioned that two ReadFiles were not happening for stat()
so this should not be a surprise.

>Therefore, the current Cygwin already has the ability to eliminate this
>performance hit -- you just need to mount filesystems with "-x", and no
>additional changes to Cygwin are necessary.
>
>Thanks to everyone who responded to my messages yesterday offering
>suggestions that helped me track this down.
>
>Given the magnitude of the performance improvement when "-x" is used, I
>wonder if its use should be recommended in the documentation, or
>perhaps it should even be the default behavior.

Setting execute permissions on everything is not a generically good
solution.  It means that cygwin will try to execute things like "foo.c".

I've mentioned that -x is a performance win in the mailing list several
times.  The old version of setup.exe used to set this for /bin and
/usr/bin.  I don't know if the current version does or not.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]