Re: [PATCH1/2] Use spawn() on Cygwin

2013-08-03 Thread Eli Zaretskii
 Date: Fri, 2 Aug 2013 22:49:31 -0400
 From: Christopher Faylor m...@cgf.cx
 
 On Tue, Jul 30, 2013 at 08:02:54PM +0300, Eli Zaretskii wrote:
  Date: Tue, 30 Jul 2013 11:52:58 -0500
  From: Norbert Thiebaud nthieb...@gmail.com
  Cc: Pavel Fedin p.fe...@samsung.com, bug-make@gnu.org
  
  fork() is a very expensive operation in cygwin.
 
 Yes, I know.  But without it, some things that are expected of a Posix
 behavior will not work.  A notable example is that the child process
 initially has all the file descriptors and global variables that the
 parent had.  'spawn' does not necessarily guarantee that.
 
 Thank you Eli.  This is my reservation about this change too.  I
 maintain the make package for Cygwin and if I have reservations, you can
 be sure that it won't make it into the released version.

And, btw, I think there's a thread on the Cygwin list just now about
one such problem.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH1/2] Use spawn() on Cygwin

2013-08-03 Thread Christopher Faylor
On Sat, Aug 03, 2013 at 11:16:44AM +0300, Eli Zaretskii wrote:
 Date: Fri, 2 Aug 2013 22:49:31 -0400
 From: Christopher Faylor m...@cgf.cx
 
 On Tue, Jul 30, 2013 at 08:02:54PM +0300, Eli Zaretskii wrote:
  Date: Tue, 30 Jul 2013 11:52:58 -0500
  From: Norbert Thiebaud nthieb...@gmail.com
  Cc: Pavel Fedin p.fe...@samsung.com, bug-make@gnu.org
  
  fork() is a very expensive operation in cygwin.
 
 Yes, I know.  But without it, some things that are expected of a Posix
 behavior will not work.  A notable example is that the child process
 initially has all the file descriptors and global variables that the
 parent had.  'spawn' does not necessarily guarantee that.
 
 Thank you Eli.  This is my reservation about this change too.  I
 maintain the make package for Cygwin and if I have reservations, you can
 be sure that it won't make it into the released version.

And, btw, I think there's a thread on the Cygwin list just now about
one such problem.

Yep.

cgf

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


[PATCH1/2] Use spawn() on Cygwin

2013-07-30 Thread Pavel Fedin
 Hello!

 Please take this patch, Cygwin team told that they would like to integrate
with upstream. I have already posted it some time ago but got no reply.
 The patch significantly improves performance of Make under Cygwin.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia




make-3.82.90-1-use-spawn-on-cygwin.diff
Description: Binary data
___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH1/2] Use spawn() on Cygwin

2013-07-30 Thread Eli Zaretskii
 From: Pavel Fedin p.fe...@samsung.com
 Date: Tue, 30 Jul 2013 14:42:23 +0400
 
  Please take this patch, Cygwin team told that they would like to integrate
 with upstream. I have already posted it some time ago but got no reply.
  The patch significantly improves performance of Make under Cygwin.

Thanks.

Is there any discussion we could read about that with the details of
the problem and how/why does the proposed patch solves it?

In general, I feel it's wrong to do this: Cygwin is a Posix platform,
so it should be using the Posix code, to be as compatible with other
Posix platforms as possible.  EMX is not a Posix platform, so using
its code will likely make the Cygwin Make deviate from Posix behavior
at times.


___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH1/2] Use spawn() on Cygwin

2013-07-30 Thread Roland Schwingel
Hi...

bug-make-bounces+roland.schwingel=onevision@gnu.org wrote on 
30.07.2013 17:39:10:

  From: Pavel Fedin p.fe...@samsung.com
  Date: Tue, 30 Jul 2013 14:42:23 +0400
  
   Please take this patch, Cygwin team told that they would like to 
integrate
  with upstream. I have already posted it some time ago but got no 
reply.
   The patch significantly improves performance of Make under Cygwin.
 
 Thanks.
 
 Is there any discussion we could read about that with the details of
 the problem and how/why does the proposed patch solves it?
 
 In general, I feel it's wrong to do this: Cygwin is a Posix platform,
 so it should be using the Posix code, to be as compatible with other
 Posix platforms as possible.  EMX is not a Posix platform, so using
 its code will likely make the Cygwin Make deviate from Posix behavior
 at times.
I am using Pavels patch for some months now in my private version of 
gnumake on cygwin heavily and I could not find any regression with it up 
to now and gnumake is in my use cases clearly faster. It is still not a 
stallion badged red italian car, but it is cruising its curves noticably 
snappier on cygwin now.

Using EMX is a shortcut to achieve the usage of spawn() over fork(). It 
might not be the cleanest choice but it works. Maybe Pavel finds the time 
to make the patch distinct to cygwin itself.

Just my $0.02,

Roland___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH1/2] Use spawn() on Cygwin

2013-07-30 Thread Paul Smith
On Tue, 2013-07-30 at 18:39 +0300, Eli Zaretskii wrote:
 In general, I feel it's wrong to do this: Cygwin is a Posix platform,
 so it should be using the Posix code, to be as compatible with other
 Posix platforms as possible.  EMX is not a Posix platform, so using
 its code will likely make the Cygwin Make deviate from Posix behavior
 at times.

If we decide to take this change I think we should reduce it to a single
#define, such as HAVE_W32_SPAWN or similar, as we did with the
HAVE_DOS_PATHS, set it in one place based on __EMX__ etc., then use that
single macro where we want to check for spawn() in the code.



___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH1/2] Use spawn() on Cygwin

2013-07-30 Thread Roland Schwingel
Hi Eli...

Eli Zaretskii e...@gnu.org wrote on 30.07.2013 18:29:53:

 From: Eli Zaretskii e...@gnu.org
 To: Roland Schwingel roland.schwin...@onevision.com
 Cc: bug-make@gnu.org, p.fe...@samsung.com
 Date: 30.07.2013 18:32
 Subject: Re: [PATCH1/2] Use spawn() on Cygwin
 
  Cc: bug-make@gnu.org, Pavel Fedin p.fe...@samsung.com
  From: Roland Schwingel roland.schwin...@onevision.com
  Date: Tue, 30 Jul 2013 18:12:55 +0200
  
  I am using Pavels patch for some months now in my private version of 
  gnumake on cygwin heavily and I could not find any regression with it 
up 
  to now and gnumake is in my use cases clearly faster.
 
 Thanks for the info.
 
 What version of Make are you using?  If it is not the version from the
 git repo, please try that, and in particular the new --output-sync
 feature.

My version is from git, but already some months old (I checked it out on 
20130114). So it is not fresh bananas. Currently I am enjailed by a very 
tight schedule. Maybe I can update my version of gnumake beginning of next 
week.

Sorry,

Roland

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH1/2] Use spawn() on Cygwin

2013-07-30 Thread Norbert Thiebaud
On Tue, Jul 30, 2013 at 10:39 AM, Eli Zaretskii e...@gnu.org wrote:
 From: Pavel Fedin p.fe...@samsung.com
 Date: Tue, 30 Jul 2013 14:42:23 +0400

  Please take this patch, Cygwin team told that they would like to integrate
 with upstream. I have already posted it some time ago but got no reply.
  The patch significantly improves performance of Make under Cygwin.

 Thanks.

 Is there any discussion we could read about that with the details of
 the problem and how/why does the proposed patch solves it?

fork() is a very expensive operation in cygwin.
we are seeing that in LibreOffice build a lot.
I will try to pick up that patch and report numbers on it (we have a
pretty big make, with 125K+ targets
http://skyfromme.wordpress.com/2013/02/28/one/ )


 In general, I feel it's wrong to do this: Cygwin is a Posix platform,
 so it should be using the Posix code, to be as compatible with other
 Posix platforms as possible.  EMX is not a Posix platform, so using
 its code will likely make the Cygwin Make deviate from Posix behavior
 at times.

in theory you are right... in practice Cygwin maybe be posix, but it's
underlying OS is not and the emulation layer can be very costly.

Norbert

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH1/2] Use spawn() on Cygwin

2013-07-30 Thread Eli Zaretskii
 Date: Tue, 30 Jul 2013 11:52:58 -0500
 From: Norbert Thiebaud nthieb...@gmail.com
 Cc: Pavel Fedin p.fe...@samsung.com, bug-make@gnu.org
 
 fork() is a very expensive operation in cygwin.

Yes, I know.  But without it, some things that are expected of a Posix
behavior will not work.  A notable example is that the child process
initially has all the file descriptors and global variables that the
parent had.  'spawn' does not necessarily guarantee that.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: [PATCH1/2] Use spawn() on Cygwin

2013-07-30 Thread Eli Zaretskii
 Date: Wed, 31 Jul 2013 01:24:45 +0400
 From: Pavel Fedin pavel_fe...@mail.ru
 Cc: bug-make@gnu.org
 
  There was a short discussion in Cygwin ML with test results, sorry, i
 cannot find the URL, Google fails to find it.

Can you at least tell when (year and month) this discussion took
place?

In any case, I think such a change can only be accepted as an optional
feature, preferably controlled by a command-line option.  I think it's
wrong to use this by default, certainly not to let users a fire escape
in case this causes differences in behavior in some use cases.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make