delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/09/03/00:31:45

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Sun, 3 Sep 2000 00:30:56 -0400
To: cygwin-developers AT sources DOT redhat DOT com
Subject: Just checked in a major change to cygwin
Message-ID: <20000903003055.A14834@cygnus.com>
Reply-To: cygwin-developers AT sources DOT redhat DOT com
Mail-Followup-To: cygwin-developers AT sources DOT redhat DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.3.6i

For the last several weeks, I've been working on giving cygwin it's own
"heap".  I use this heap to allocate memory that should be common to a
process's children.  This was one of the things that I desperately wanted
copy-on-write for but I ended up implementing my own crude version instead.

This means that cygwin can now pass the argv list from an exec to it's
child without attempting to quote it for Microsoft consumption.  We can
also just pass the environment almost "as-is".  Ditto for the current
working directory.  Ditto for the fd table.

This means that there should be fewer calls to the OS which should
translate into better performance.

I have noticed some modest performance improvement from this change but
I've also done one other thing.  A while ago I added an -X option to
the mount command.  So, if you do something like:

mount -X -b f:\cygwin\bin /bin

this will tell Cygwin that everything in /bin is an executable cygwin
program.  So Cygwin will make no attempt to set up commands and
environment variables for a normal Windows program.

This differs from:

mount -x -b f:\cygwin\bin /bin

in that the '-x' above only tells Cygwin that stuff in the directory
is executable.  This also should provide a small performance gain,
especially on samba drives.

You can also mark individual files as executable or cygwin-executable
by doing something like:

mount -X -b q:\perl\perl.exe

Anyway, this was a major change and I assume that there will be all
sorts of fallout from it.  Hopefully, the gain will be worth the pain.

I should note that a lot of the speed improvement comes from a malloc.c
implementation that DJ wrote.  I'd previously tried to use Microsoft's
Heap functions and was disappointed to notice that there was no discernible
improvement.  With DJ's malloc/realloc/free this all changed.

(Damn, I just did a clean build and cygwin is busted.  Oh well, I guess
I'll fix this tomorrow.)

cgf

- Raw text -


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