X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- Date: Sat, 30 Jul 2011 17:17:15 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Slow performance Win7/64 Message-ID: <20110730211715.GA31852@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20110729092602 DOT GB19240 AT calimero DOT vinschen DOT de> <20110729130645 DOT GA28223 AT ednor DOT casa DOT cgf DOT cx> <20110730210908 DOT GA31747 AT ednor DOT casa DOT cgf DOT cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110730210908.GA31747@ednor.casa.cgf.cx> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Sat, Jul 30, 2011 at 05:09:08PM -0400, Christopher Faylor wrote: >On Fri, Jul 29, 2011 at 09:06:45AM -0400, Christopher Faylor wrote: >>On Fri, Jul 29, 2011 at 12:52:47PM +0000, Heiko Elger wrote: >>>Hello, >>> >>>Corinna Vinschen writes: >>>> >>>> The slowdown of the code was the result of a patch which was supposed >>>> to fix a potential race condition. Jojelino's patch looks nice, but >>>> it might reintroduce a new race. Handle with care. >>>Oops - what king of race condition do you mean. >>> >>>OK - that's a new information for me. >>>So the current slow implementation is a workaround for another race condition. >> >>The signal startup has been very carefully crafted. Starting wait_sig >>asynchronously could create inability to send signals. >> >>I can't check this right now. I should be back near my Windows system on the >>weekend. > >I've checked in a change which uses QueueUserAPC to create threads like >the signal thread. As everyone has noted this seems to have a salutory >effect on the OP's test case. > >I don't entirely understand why the code which already existed in Cygwin >to deal with the "slow performance on win7/64" didn't fix the problem but >using QueueUserAPC seems to solve the problem so I guess won't lose too >much sleep over this. > >Thanks jojelino for the idea. Much appreciated. Oops. Forgot to mention that these changes are available in the most recent snapshot at: http://cygwin.com/snapshots/ . cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple