mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Smith <psmith@gnu.org>
To: David Laight <David.Laight@ACULAB.COM>,
	'Linus Torvalds' <torvalds@linux-foundation.org>
Cc: 'Arnd Bergmann' <arnd@arndb.de>,
	'Masahiro Yamada' <yamada.masahiro@socionext.com>,
	'Linux Kernel Mailing List' <linux-kernel@vger.kernel.org>
Subject: Re: I disabled more compiler warnings..
Date: Tue, 12 May 2020 12:55:19 -0400	[thread overview]
Message-ID: <d743bd7bec25c939d7419a3512239b43b990af5a.camel@gnu.org> (raw)
In-Reply-To: <464ab7c2d9e144718e4a3135a41f3056@AcuMS.aculab.com>

On Tue, 2020-05-12 at 15:04 +0000, David Laight wrote:
> I think there were some sub-makes that were started with make
> instead of $(MAKE) so ended up creating a new job pipe.

Oh, yes, that will do it.

> Doesn't it do blocking reads with SIGCHLD enabled?

No, because it's racy (by itself).

> (or hopefully ppoll() to avoid the race)

GNU make uses pselect(), on systems that support it.  On systems that
don't support pselect() it uses a trick I described in another email:
we dup() the FD, read() on the dup, then in the SIGCHLD handler we
close() the dup.

> Another option is for the 'parent' make to return (or not acquire)
> a job token for $(MAKE) commands.

It just feels cleaner to me to have the parent simply always take the
token, and leave it up to the child to put it back if appropriate,
rather than the parent putting it back.

Having the parent not acquire a token at all won't work; without
limiting sub-makes it means you might have 100's of them running at the
same time, even with -j2 or whatever.

> Or, require the sub-make acquire a token in order to exit.
> Then it can free the token when every job terminates.

I'm not sure I follow that?


  reply	other threads:[~2020-05-12 16:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 19:33 Linus Torvalds
2020-05-11  7:43 ` David Laight
2020-05-11 17:41   ` Linus Torvalds
2020-05-11 17:58     ` Paul Smith
2020-05-11 19:33       ` Linus Torvalds
2020-05-11 20:25         ` Paul Smith
2020-05-11 21:09       ` David Laight
2020-05-12  7:55         ` David Laight
2020-05-12 14:35           ` Paul Smith
2020-05-12 15:04             ` David Laight
2020-05-12 16:55               ` Paul Smith [this message]
2020-05-13  8:21                 ` David Laight
2020-05-13 15:32                   ` Paul Smith
2020-05-13 15:53                     ` David Laight
2020-05-13 16:06                       ` Paul Smith
2020-05-11  9:03 ` Arnd Bergmann
2020-05-11 11:11   ` Arnd Bergmann

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=d743bd7bec25c939d7419a3512239b43b990af5a.camel@gnu.org \
    --to=psmith@gnu.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=yamada.masahiro@socionext.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

all inboxes | Powered by JetHome®