delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/13/15:19:27

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 13 Feb 2001 14:54:01 -0500
Message-Id: <200102131954.OAA09284@envy.delorie.com>
X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f
From: DJ Delorie <dj AT delorie DOT com>
To: jik-cygwin AT curl DOT com
CC: cygwin AT cygwin DOT com
In-reply-to: <20010213194612.17311.qmail@lizard.curl.com>
(jik-cygwin AT curl DOT com)
Subject: Re: Optimizing away "ReadFile" calls when Make calls stat()
References: <4 DOT 3 DOT 1 DOT 2 DOT 20010213134821 DOT 019a7130 AT pop DOT ma DOT ultranet DOT com> <20010213190131 DOT 14369 DOT qmail AT lizard DOT curl DOT com> <200102131935 DOT OAA09136 AT envy DOT delorie DOT com> <20010213194612 DOT 17311 DOT qmail AT lizard DOT curl DOT com>

> As I've noted separately, reading tens of thousands of files even once
> incurs a significant performance penalty.

True, but reading them all once is better than reading them all twice.
I'm trying to break the problem down into small enough changes that we
actually have a chance of implementing them.

> The change I've proposed can eliminate reading them at all.

But not in a way that we can make it the default.  Perhaps you could
propose a set of mount flags to optimize common situations?  We
already have one to avoid the read-for-execute test, perhaps you could
work on an assume-no-symlinks flag?  Then we wouldn't need a custom
make.exe (or any other program).

> But it does nothing at all for the "usual case" I'm trying to
> optimize, which is Make stat()ing a file but never reading it.

It does, because stat() reads the file twice, once to see if it's a
symlink, and once to see if the executable bit needs to be set.

> >  These should be easier wins (thus, more doable) than a global cache,
> >  which NT should be providing itself as part of the disk cache
> >  subsystem (for local drives, at least).  I don't think it's
> >  appropriate for cygwin to go beyond this anyway - too many race
> >  conditions arise.
> 
> As far as I know, there are no race conditions in the change I
> suggested.  In fact, it *removes* race conditions, since it reduces
> the number of distinct OS operations that must be performed on a file
> during stat().

Right, but others were suggesting a global cache of file bytes.
*That* would introduce race conditions.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019