[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250501012019.GB3762678@ax162>
Date: Wed, 30 Apr 2025 18:20:19 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Rong Xu <xur@...gle.com>
Cc: Masahiro Yamada <masahiroy@...nel.org>,
Nicolas Schier <nicolas.schier@...ux.dev>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>,
Miguel Ojeda <ojeda@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Alice Ryhl <aliceryhl@...gle.com>,
Sami Tolvanen <samitolvanen@...gle.com>,
"Mike Rapoport (Microsoft)" <rppt@...nel.org>,
Rafael Aquini <aquini@...hat.com>,
Michael Ellerman <mpe@...erman.id.au>,
Stafford Horne <shorne@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Teresa Johnson <tejohnson@...gle.com>, linux-kernel@...r.kernel.org,
linux-kbuild@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] kbuild: distributed build support for Clang ThinLTO
Hi Rong,
On Tue, Apr 29, 2025 at 01:34:00PM -0700, Rong Xu wrote:
> Just wanted to gently follow up on this patch that I sent previously.
>
> From a toolchain and compiler perspective, I genuinely believe that
> kernel ThinLTO builds should use this. I really want to get some feedback
> and reviews on this patch.
My apologies for some radio silence, other regressions and issues have
been higher priority until now. I will try to take a closer look at this
soon but I do have one comment based on your comment above and the
Kconfig help text...
> On Sat, Apr 19, 2025 at 6:02 PM <xur@...gle.com> wrote:
...
> > diff --git a/arch/Kconfig b/arch/Kconfig
> > index b0adb665041f1..cbeeeb9b076d8 100644
> > --- a/arch/Kconfig
> > +++ b/arch/Kconfig
> > @@ -810,6 +810,18 @@ config LTO_CLANG_THIN
> > https://clang.llvm.org/docs/ThinLTO.html
> >
> > If unsure, say Y.
> > +
> > +config LTO_CLANG_THIN_DIST
> > + bool "Clang ThinLTO in distributed mode (EXPERIMENTAL)"
> > + depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN
> > + select LTO_CLANG
> > + help
> > + This option enables Clang's ThinLTO in distributed build mode.
> > + In this mode, the linker performs the thin-link, generating
> > + ThinLTO index files. Subsequently, the build system explicitly
> > + invokes ThinLTO backend compilation using these index files
> > + and pre-linked IR objects. The resulting final object files
> > + are with the .final_o suffix.
> > endchoice
This says what the option does but it does not really say why the user
would want to use this over CONFIG_LTO_CLANG_THIN_DIST; even as someone
relatively familiar with these technologies, I am not sure what this
means for the build or resulting kernel. Is there any reason why a user
would want to use in-process ThinLTO instead of distributed? You seem to
make the case above and in Discourse that the kernel would benefit from
this, so should we just wholesale replace in-process ThinLTO with the
distributed one?
Cheers,
Nathan
Powered by blists - more mailing lists