Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 19 Apr 2002 22:18:08 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Copy-on-write fork Message-ID: <20020420021808.GA648@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <018501c1e810$0bea9bd0$0100a8c0 AT advent02> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <018501c1e810$0bea9bd0$0100a8c0@advent02> User-Agent: Mutt/1.3.23.1i On Sat, Apr 20, 2002 at 03:06:55AM +0100, Chris January wrote: >This is mainly a question aimed at Christopher Faylor, but maybe someone >else knows the answer. >My question is, with regard to Chris's post "Re: copy-on-write (oh well)" >[http://www.cygwin.com/ml/cygwin-developers/2000-07/msg00026.html], does >anyone know why a copy-on-write implementation of fork takes longer than the >current Cygwin version?? >BTW, I've not had any problems forking beyond the first level using the >example code from 'Window NT/2000 Native API reference'. What problems did >you encounter Chris? My test case is probably not rigorous enough. I don't know. I've remarked on this in the past. My benchmarks showed the same thing. I was excited about doing this when I was first hired by Cygnus since I wanted to contribute to making cygwin faster. I implemented a fork using Windows API copy-on-write (for NT) and I believe I also tried to use the low-level NT technique. Neither showed any noticeable performance gain and, of course, both suffered from being NT-only. I assume that one possible reason is that the copy-on-write fork may be somehow bypassing normal in-memory sharing of text segments but I never knew for sure. The problems with forking beyond the first level are for the Windows API method, not with the low-level NT calls. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/