All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'psmith@gnu.org'" <psmith@gnu.org>,
	'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: Wed, 13 May 2020 15:53:43 +0000	[thread overview]
Message-ID: <b206fa1343b94f768ce0d57f0234c8e7@AcuMS.aculab.com> (raw)
In-Reply-To: <6a5a75043f697a130422fbc3a3f8464dc6d03e2f.camel@gnu.org>

From: Paul Smith
> Sent: 13 May 2020 16:33
> On Wed, 2020-05-13 at 08:21 +0000, David Laight wrote:
...
> If we don't have pselect() we use the close() in the signal handler.
> In that case we're just waiting in the read(), we're not using select()
> or poll() or whatever.  It's definitely the case that if we're waiting
> in read() and someone closes the FD, we'll wake up! :)

Ugg, that is relying on getting either EINTR or EBADFD.
I can't remember if Posix allows SIGCHLD to be delivered
in a different thread.
Windows definitely likes delivering signals that way :-)

> > > 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.
> >
> > Hmmm...
> > That means the sub-make must always hold one token.
> > Otherwise the parent-make could use it to create a new sub-make.
> 
> Right, my first idea has this same problem so it won't work.
> 
> > Actually the token pipe can be opened NON_BLOCK because poll()
> > can/will be used to wait for a token.
> 
> Again, that only works on systems where pselect() is available.
> 
> > So you always try to read a token - even when you have one 'in your
> > hand' (either entry or because a job just finished).  If it isn't the
> > 'abort' one, put it back.
> 
> Something like that would be needed, yes.
> 
> Note this is only needed in a rare situation where you're running with
> parallelism enabled BUT you have a makefile which never actually tries
> to run two or more jobs at the same time for some reason.

I did have to recirculate the tokens.
Can't exactly remember why.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  reply	other threads:[~2020-05-13 15:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 19:33 I disabled more compiler warnings 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
2020-05-13  8:21                 ` David Laight
2020-05-13 15:32                   ` Paul Smith
2020-05-13 15:53                     ` David Laight [this message]
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=b206fa1343b94f768ce0d57f0234c8e7@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=psmith@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.