public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Denys Vlasenko <dvlasenk@redhat.com>, Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Borislav Petkov <bp@alien8.de>,
	Andy Lutomirski <luto@amacapital.net>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Alexei Starovoitov <ast@plumgrid.com>,
	Will Drewry <wad@chromium.org>, Kees Cook <keescook@chromium.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: Deinline cpuid_eax and friends
Date: Wed, 06 May 2015 11:59:40 -0700	[thread overview]
Message-ID: <554A649C.8070605@zytor.com> (raw)
In-Reply-To: <1430932057-26574-1-git-send-email-dvlasenk@redhat.com>

On 05/06/2015 10:07 AM, Denys Vlasenko wrote:
> cpuid_e{a,b,c,d}x() functions compile to 44 bytes of machine code each.
> On x86 allyesconfig build they have 48 callsites.
> Deinlining all four of them shrinks kernel by about 1k:
> 
>    text      data      bss       dec     hex filename
> 82434909 22255384 20627456 125317749 7783275 vmlinux.before
> 82433898 22255384 20627456 125316738 7782e82 vmlinux
> 
> Speed impact: CPUID instruction takes from 50 to 350+ cycles,
> call overhead is negligible in comparison.

How on Earth does it make 44 bytes?  Is this due to paravirt_fail?

	-hpa



  reply	other threads:[~2015-05-06 19:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 17:07 [PATCH] x86: Deinline cpuid_eax and friends Denys Vlasenko
2015-05-06 18:59 ` H. Peter Anvin [this message]
2015-05-06 19:09   ` Denys Vlasenko
2015-05-06 20:41     ` H. Peter Anvin
2015-05-07  8:57       ` Denys Vlasenko

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=554A649C.8070605@zytor.com \
    --to=hpa@zytor.com \
    --cc=ast@plumgrid.com \
    --cc=bp@alien8.de \
    --cc=dvlasenk@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=wad@chromium.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