From: Peter Zijlstra <peterz@infradead.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Michal Marek <michal.lkml@markovi.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Sam Ravnborg <sam@ravnborg.org>, X86 ML <x86@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Changbin Du <changbin.du@gmail.com>,
linux-toolchains@vger.kernel.org,
clang-built-linux <llvm@lists.linux.dev>
Subject: Re: [PATCH] kbuild: Remove CONFIG_DEBUG_SECTION_MISMATCH
Date: Fri, 8 Apr 2022 22:48:05 +0200 [thread overview]
Message-ID: <YlCfhUkOXTvqCfjT@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <YlCb3L7ByWwszbaA@hirez.programming.kicks-ass.net>
On Fri, Apr 08, 2022 at 10:32:28PM +0200, Peter Zijlstra wrote:
> > > This weird option is having us upgrade quite a few 'inline' to
> > > '__always_inline'.
> >
> > As is, the assumption that __init functions only call other __init
> > functions or __always_inline is a brittle house of cards that leads to
> > a "what color is your function" [0] scenario, and leads to code that
> > happens to not emit warnings for compiler X (or compiler X version Y).
> > There's also curious exceptions in modpost that look like memory leaks
> > to me.
So I don't see __always_inline that way (also I'm in the 'inline' should
be '__always_inline' camp).
To me inline is more like: 'instantiate that pattern *here*'. It's like
CPP macros, only less horrible. You get the code generated according to
the local rules (instrumentation yes/no, section, and whatever other
function attributes we have that affect code-gen).
So with inline we can get the same pattern instantiated a number of
different times, leading to different actual code, without having to
type the whole thing multiple times (which would be terrible for
maintenance) etc..
Combine __always_inline with constant propagation of inline function
'pointers' and you get do beautiful things ;-) /me runs
next prev parent reply other threads:[~2022-04-08 20:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 16:21 [PATCH] kbuild: Remove CONFIG_DEBUG_SECTION_MISMATCH Josh Poimboeuf
2022-04-08 18:29 ` Masahiro Yamada
2022-04-08 19:14 ` Peter Zijlstra
2022-04-08 20:08 ` Nick Desaulniers
2022-04-08 20:16 ` Nick Desaulniers
2022-04-08 20:32 ` Peter Zijlstra
2022-04-08 20:48 ` Peter Zijlstra [this message]
2022-04-09 10:33 ` Arnd Bergmann
2022-04-09 0:48 ` Josh Poimboeuf
2022-04-20 17:03 ` Nick Desaulniers
2022-04-20 17:30 ` Josh Poimboeuf
2022-04-08 20:27 ` Nick Desaulniers
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=YlCfhUkOXTvqCfjT@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=arnd@arndb.de \
--cc=changbin.du@gmail.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-toolchains@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
--cc=sam@ravnborg.org \
--cc=x86@kernel.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