mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Ingo Molnar' <mingo@kernel.org>, Alexey Dobriyan <adobriyan@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>, Andy Lutomirski <luto@kernel.org>
Subject: RE: FYI -ffreestanding shrinks kernel by 2% on x86_64
Date: Mon, 13 May 2019 09:13:25 +0000	[thread overview]
Message-ID: <3a3b9e840dbb456ab01815f7afdbb493@AcuMS.aculab.com> (raw)
In-Reply-To: <20190512093228.GA8088@gmail.com>

From: Ingo Molnar
> Sent: 12 May 2019 10:32
...
> Has anyone investigated by any chance where the -ffreestanding space
> savings come from mostly - is it mostly in cold paths, or does it make or
> hot codepaths more efficient as well?
> 
> If it's the latter then the kernel would be directly faster as well
> (fewer instructions executed), not just indirectly from better cache
> packing, I suppse?

My guess is that -ffreestanding stops gcc inlining memcpy() (etc).
The calls can be smaller than the inline code, but will (probably)
run more slowly.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


      parent reply	other threads:[~2019-05-13  9:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-11 20:02 FYI -ffreestanding bloats " Alexey Dobriyan
2019-05-11 20:13 ` FYI -ffreestanding shrinks " Alexey Dobriyan
2019-05-12  9:32   ` Ingo Molnar
2019-05-12 17:55     ` Alexey Dobriyan
2019-05-13  9:13     ` David Laight [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=3a3b9e840dbb456ab01815f7afdbb493@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=adobriyan@gmail.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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®