Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Wed, 14 Feb 2001 16:13:06 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Followup on eliminating symlink ReadFile calls -- it's not necessary Message-ID: <20010214161306.D18567@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20010214174608 DOT 17253 DOT qmail AT lizard DOT curl DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: <20010214174608.17253.qmail@lizard.curl.com>; from jik@curl.com on Wed, Feb 14, 2001 at 12:46:08PM -0500 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