public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/107014] New: flatten+lto
@ 2022-09-23  7:38 jirislaby at gmail dot com
  2022-09-23  7:55 ` [Bug lto/107014] flatten+lto fails the kernel build marxin at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jirislaby at gmail dot com @ 2022-09-23  7:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107014
           Summary: flatten+lto
           Product: gcc
           Version: 12.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jirislaby at gmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Maybe this is simply a dup of bug 77472, but I am not sure what the proper
solution is supposed to be.

In the kernel, when LTO is enabled, we disable flatten completely, so that the
build is able to finish -- in ~ 2 minutes, w/ 4G of RAM.

With flatten enabled, the build didn't finish in 10 minutes, eating 40G of RAM
at that point.

There is only a single user of flatten in the kernel: pcpu_build_alloc_info().
Here:
https://github.com/torvalds/linux/blob/bf682942cd26ce9cd5e87f73ae099b383041e782/mm/percpu.c#L2852-L2855

And that on its own makes the link not to finish in a reasonable time, with
reasonable RAM. I suppose much inlining happens in such a long function. But:
shouldn't really there be any limit?

I am going to link this bug in the commit message disabling flatten on LTO, so
that we have a reference of why/how...

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-09-25 19:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23  7:38 [Bug lto/107014] New: flatten+lto jirislaby at gmail dot com
2022-09-23  7:55 ` [Bug lto/107014] flatten+lto fails the kernel build marxin at gcc dot gnu.org
2022-09-23  8:04 ` rguenth at gcc dot gnu.org
2022-09-23  8:21 ` amonakov at gcc dot gnu.org
2022-09-23  8:24 ` jirislaby at gmail dot com
2022-09-23  8:28 ` amonakov at gcc dot gnu.org
2022-09-23  9:52 ` jirislaby at gmail dot com
2022-09-23 10:12 ` amonakov at gcc dot gnu.org
2022-09-23 10:36 ` jakub at gcc dot gnu.org
2022-09-25 19:56 ` andi-gcc at firstfloor dot org

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).