archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <>
To: Nick Desaulniers <>
Cc: Masahiro Yamada <>,
	Josh Poimboeuf <>,
	Michal Marek <>,
	Linux Kernel Mailing List <>,
	Linux Kbuild mailing list <>,
	Sam Ravnborg <>, X86 ML <>,
	Arnd Bergmann <>,
	Changbin Du <>,,
	clang-built-linux <>
Date: Fri, 8 Apr 2022 22:48:05 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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

      reply	other threads:[~2022-04-08 20:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
     [not found] ` <>
     [not found]   ` <>
2022-04-08 20:08     ` [PATCH] kbuild: Remove CONFIG_DEBUG_SECTION_MISMATCH 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]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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 NNTP newsgroup(s).