linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Russell King - ARM Linux admin <linux@armlinux.org.uk>,
	Will Deacon <will@kernel.org>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	linux-arch <linux-arch@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Stefan Wahren <wahrenst@gmx.net>, Kees Cook <keescook@google.com>,
	Arnd Bergmann <arnd@arndb.de>,
	clang-built-linux <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly
Date: Thu, 3 Oct 2019 10:08:09 -0700	[thread overview]
Message-ID: <CAHk-=whkB+g0R0JqLB+Y4piUZf9A8P1ugi5T92LjFLNY+epBeg@mail.gmail.com> (raw)
In-Reply-To: <CAHk-=wiMm3rN15WmiAqMHjC-pakL_b8qgWsPPri0+YLFORT-ZA@mail.gmail.com>

On Thu, Oct 3, 2019 at 10:01 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> If this is purely about the fact that x86 is different from other
> architectures, then let's remove the "compiler can do stupid things"
> option on x86 too. It was never clear that it was a huge advantage.

Side note: what might be an actual advantage would be to have a mode
where you see when the compiler would choose to not inline things.

Maybe we have things that are marked "inline" that simply shouldn't
be. We do tend to have this history of adding small helper functions
to header files, and then they grow and grow and grow. And now they
shouldn't be in a header file any more, but they still are.

So having a "compiler doesn't want to inline this" flag might be
useful for finding those, but it might also be useful for people
looking for what triggers bugs.

But honestly, the last time I saw somebody argue for "I don't want
inlining", it was the broken "I want to compiler the kernel with no
optimizations so that it's easier to look at the resulting code". That
was just a _bad_ bad patch. And if it is concerns like that that are
driving this "compiler doesn't have to inline", then we should stop it
immediately.

             Linus

  reply	other threads:[~2019-10-03 17:08 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30  3:43 [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly Masahiro Yamada
2019-08-30 20:54 ` Nick Desaulniers
2019-09-26  8:54 ` Geert Uytterhoeven
2019-09-26  9:02   ` Masahiro Yamada
2019-09-26  9:26     ` Geert Uytterhoeven
2019-09-26  9:46       ` Masahiro Yamada
2019-09-27 10:43 ` Nicolas Saenz Julienne
2019-09-27 10:59   ` Charles Keepax
2019-09-27 22:08   ` Nick Desaulniers
2019-09-27 22:38     ` Linus Torvalds
2019-09-30 11:26       ` Will Deacon
2019-09-30 12:05         ` Masahiro Yamada
2019-09-30 12:18           ` Will Deacon
2019-09-30 21:50             ` Nick Desaulniers
2019-09-30 22:08               ` Miguel Ojeda
2019-09-30 22:34                 ` Nick Desaulniers
2019-10-01  9:28               ` Will Deacon
2019-10-01 16:32                 ` Nick Desaulniers
2019-10-01 17:01                   ` Will Deacon
2019-10-01 17:44                     ` Nick Desaulniers
2019-10-01 17:55                       ` Russell King - ARM Linux admin
2019-10-01 18:00                         ` Nick Desaulniers
2019-10-01 18:14                           ` Russell King - ARM Linux admin
2019-10-01 20:21                             ` Nick Desaulniers
2019-10-01 20:53                               ` Arnd Bergmann
2019-10-01 21:06                                 ` Miguel Ojeda
2019-10-01 21:14                                   ` Nick Desaulniers
2019-10-01 20:59                               ` Russell King - ARM Linux admin
2019-10-01 21:26                                 ` Russell King - ARM Linux admin
2019-10-01 21:32                                   ` Nick Desaulniers
2019-10-01 21:58                                     ` Russell King - ARM Linux admin
2019-10-02 12:55                               ` Geert Uytterhoeven
2019-10-02 18:51                                 ` Will Deacon
2019-10-02 20:39                                 ` Linus Torvalds
2019-10-03  2:10                                   ` Masahiro Yamada
2019-10-03 17:01                                     ` Linus Torvalds
2019-10-03 17:08                                       ` Linus Torvalds [this message]
2019-10-03 17:23                                       ` Masahiro Yamada
2019-10-03 17:29                                         ` Linus Torvalds
2019-10-03 20:21                                           ` Miguel Ojeda
2019-10-04  7:37                                             ` Geert Uytterhoeven
2019-10-03 16:36                                   ` Will Deacon
2019-10-12 10:15                                     ` Stefan Wahren
2019-10-12 11:12                                       ` Masahiro Yamada
2019-10-12 14:45                                       ` Russell King - ARM Linux admin
2019-10-01  9:39             ` Masahiro Yamada
2019-10-01 10:40               ` Will Deacon
2019-09-27 10:58 ` Nicolas Saenz Julienne
2019-09-30  6:04   ` Masahiro Yamada

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='CAHk-=whkB+g0R0JqLB+Y4piUZf9A8P1ugi5T92LjFLNY+epBeg@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=geert@linux-m68k.org \
    --cc=keescook@google.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=wahrenst@gmx.net \
    --cc=will@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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;
as well as URLs for NNTP newsgroup(s).