public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/96794] --with-build-config=bootstrap-lto-lean with --enable-link-mutex leads to poor LTRANS utilization
Date: Wed, 26 Aug 2020 13:20:54 +0000	[thread overview]
Message-ID: <bug-96794-4-ibtGGNvYCV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96794-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96794

--- Comment #12 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 26 Aug 2020, matz at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96794
> 
> --- Comment #11 from Michael Matz <matz at gcc dot gnu.org> ---
> (In reply to Jan Hubicka from comment #10)
> > > We could also punt: when enable-link-mutex we could artificially up the job
> > > number for make to account for the waiting link steps.  I.e. when normally -jN
> > > was given, the link step could be done under -j(N + nr-language - 1).  That
> > > would lead to the
> > > nr-of-languages-1 job server tokens taken up by the sleeping link steps to be
> > > accounted for, and hence the (single running) link step still be able to use N
> > > threads/processes in parallel.
> > 
> > I do not think it is easy to do with current make jobserver.  The
> > toplevel jobserver opens the pipi with -jN many tokens and all other
> > makes connect to it.  It does not provide interface to return a token
> > and re-take it unless we implement it of course.
> 
> Sure, but that's not the only way the above punting could be done.  The
> parallel
> phase that currently communicates with the jobserver essentially tries to get N
> tokens.  It could be changed to assume that there are implicitely
> nr-of-languages-1 more tokens available.  I.e. the number of threads/processes
> would always be enlarged by nr-of-languages-1, even without any tokens from the
> jobserver.

I wonder whether the link-mutex is better be implemented with
a set of artificial dependences.  If we want to serialize
building cc1, cc1plus, etc. then just have

cc1: cc1plus
cc1plus: ...
...

and only conditionally enable those somehow.  But IIRC nowadays
that "waiting" also prints those progress markers ...

      parent reply	other threads:[~2020-08-26 13:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  9:16 [Bug bootstrap/96794] New: " marxin at gcc dot gnu.org
2020-08-26  9:17 ` [Bug bootstrap/96794] " marxin at gcc dot gnu.org
2020-08-26  9:49 ` [Bug bootstrap/96794] New: " Jan Hubicka
2020-08-26  9:49 ` [Bug bootstrap/96794] " hubicka at ucw dot cz
2020-08-26  9:56 ` marxin at gcc dot gnu.org
2020-08-26 10:04   ` Jan Hubicka
2020-08-26 10:04 ` hubicka at ucw dot cz
2020-08-26 10:13 ` marxin at gcc dot gnu.org
2020-08-26 10:14   ` Jan Hubicka
2020-08-26 10:14 ` hubicka at ucw dot cz
2020-08-26 10:40 ` rguenth at gcc dot gnu.org
2020-08-26 10:58 ` rguenther at suse dot de
2020-08-26 11:07 ` marxin at gcc dot gnu.org
2020-08-26 12:23 ` matz at gcc dot gnu.org
2020-08-26 12:35 ` hubicka at ucw dot cz
2020-08-26 13:02 ` matz at gcc dot gnu.org
2020-08-26 13:20 ` rguenther at suse dot de [this message]

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=bug-96794-4-ibtGGNvYCV@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).