mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Marco Elver <elver@google.com>
Cc: Borislav Petkov <bp@alien8.de>, Arnd Bergmann <arnd@arndb.de>,
	Boqun Feng <boqun.feng@gmail.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Will Deacon <will@kernel.org>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] generic/bitops: Always inline some more generic helpers
Date: Fri, 14 Jan 2022 09:12:37 +0100	[thread overview]
Message-ID: <YeEwdYXOjhFfuvKA@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CANpmjNO2mGJjb6YO0EsgjYsEuuF9sGP26Vazb2w0NZ2svevcsA@mail.gmail.com>

On Thu, Jan 13, 2022 at 05:58:57PM +0100, Marco Elver wrote:
> On Thu, 13 Jan 2022 at 16:53, Borislav Petkov <bp@alien8.de> wrote:
> >
> > From: Borislav Petkov <bp@suse.de>
> >
> > Hi all,
> >
> > a build report by the 0day robot:
> >
> >   https://lore.kernel.org/r/Yc7t934f%2Bf/mO8lj@zn.tnic
> >
> > made me look at asm and how gcc, at least, generates funky calls to the
> > *_bit() bit manipulation functions on x86 instead of inlining them into
> > the call sites as on x86 that's a single insn, in most of the cases.
> >
> > So PeterZ says the way to go is to always inline them. So here they are.
> > The fun thing is that on x86 there is even a size decrease of more than
> > a Kilobyte for a defconfig, which is nice, see patch 1.
> >
> > As always, comments and suggestions are welcome.
> >
> > Thx.
> >
> > Borislav Petkov (2):
> >   asm-generic/bitops: Always inline all bit manipulation helpers
> >   cpumask: Always inline helpers which use bit manipulation functions
> >
> >  include/asm-generic/bitops/instrumented-atomic.h | 12 ++++++------
> >  .../asm-generic/bitops/instrumented-non-atomic.h | 16 ++++++++--------
> >  include/linux/cpumask.h                          | 14 +++++++-------
> >  3 files changed, 21 insertions(+), 21 deletions(-)
> 
> Acked-by: Marco Elver <elver@google.com>
> 
> Yup, this is probably something we should have done a long time ago. :-)

Thanks, I'll go stuff it in locking/core.

      reply	other threads:[~2022-01-14  8:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 15:53 Borislav Petkov
2022-01-13 15:53 ` [PATCH 1/2] asm-generic/bitops: Always inline all bit manipulation helpers Borislav Petkov
2022-01-26 13:30   ` [tip: locking/core] " tip-bot2 for Borislav Petkov
2022-01-13 15:53 ` [PATCH 2/2] cpumask: Always inline helpers which use bit manipulation functions Borislav Petkov
2022-01-26 13:30   ` [tip: locking/core] " tip-bot2 for Borislav Petkov
2022-01-13 16:58 ` [PATCH 0/2] generic/bitops: Always inline some more generic helpers Marco Elver
2022-01-14  8:12   ` 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:
  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=YeEwdYXOjhFfuvKA@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=elver@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=will@kernel.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

all inboxes | Powered by JetHome®