public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Peter Dons Tychsen <donpedro@tdcadsl.dk>
To: cygwin@cygwin.com
Subject: Re: Synchronization problem with posix_spawn
Date: Mon, 03 Aug 2020 11:10:10 +0200	[thread overview]
Message-ID: <9c44f4351d459a2ba8d27c65bf71679208cb13d6.camel@tdcadsl.dk> (raw)
In-Reply-To: <20200731081025.GB460314@calimero.vinschen.de>

Hi all,

On Fri, 2020-07-31 at 10:10 +0200, Corinna Vinschen wrote:
> Oh well.  I did a quick test with your new testcase (thanks for
> that!)
> and it seems to be a bit more complicated than I anticipated
> yesterday.
> The parent-child relationship between the processes is broken.  I
> have
> to think a while about this problem, stay tuned.

I also have seen this problem. I propose a different solution however.
Why no get rid of the call to fork() all together. One of the things
bogging down performance on larger setups is the calls to fork() are is
inherently slow and should be avoided at all costs. Instead why don't
we just call spawn(vpe) instead, which is quite stable and fast.

This would give a _huge_ boost to e.g. larger build jobs. Make supports
posix_spawn, but it does not help on cygwin at it just calls back into
fork().

The current implementation is probably something that makes sense on
BSD/linux as fork() is lightning fast there.

Just an idea... 

/pedro



  reply	other threads:[~2020-08-03  9:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 20:17 Ken Brown
2020-07-29 23:12 ` Ken Brown
2020-07-30 11:59   ` Corinna Vinschen
2020-07-30 17:17     ` Corinna Vinschen
2020-07-30 23:04       ` Ken Brown
2020-07-31  8:10         ` Corinna Vinschen
2020-08-03  9:10           ` Peter Dons Tychsen [this message]
2020-08-03 10:50             ` Corinna Vinschen
2020-08-20  5:40               ` Peter Dons Tychsen
2020-08-20 12:50                 ` Corinna Vinschen
2020-08-21  7:58                   ` Peter Dons Tychsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c44f4351d459a2ba8d27c65bf71679208cb13d6.camel@tdcadsl.dk \
    --to=donpedro@tdcadsl.dk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).