From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5839C3858401; Mon, 18 Jul 2022 07:55:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5839C3858401 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/106328] Build doesn't respect -j N flag Date: Mon, 18 Jul 2022 07:55:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 11.3.0 X-Bugzilla-Keywords: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status keywords cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2022 07:55:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106328 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |lto Last reconfirmed| |2022-07-18 Ever confirmed|0 |1 --- Comment #2 from Richard Biener --- That's the WPA LTRANS file generation which does not use the jobserver but parallelizes for I/O. There is --param lto-max-streaming-parallelism you can use to limit things but it's default is 32 (but that would be per actual parallel invoked LTO link step, so with -j8 it's 8 * 32 when there are 8 parallel invoked link steps). See gcc/lto/lto.{c,cc}:stream_out_partitions which indeed says #ifdef HAVE_WORKING_FORK ... /* Do not run more than LTO_PARALLELISM streamings FIXME: we ignore limits on jobserver. */ if (lto_parallelism > 0 && nruns >=3D lto_parallelism) { wait_for_child (); ... if (!cpid) { setproctitle ("lto1-wpa-streaming"); so "confirmed" - it doesn't honor the jobserver. Note without using -flto=3Dauto or -flto=3Djobserver it would be all serial, note the above also does not honor a limit placed via -flto=3D8 I think.=