public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Ma, Ling" <ling.ma@intel.com>
Cc: Arjan van de Ven <arjan@infradead.org>,
	Dave Jones <davej@redhat.com>, "hpa@zytor.com" <hpa@zytor.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC] [X86] Compile Option Os versus O2 on latest x86 platform
Date: Wed, 2 Dec 2009 10:47:30 +0100	[thread overview]
Message-ID: <20091202094730.GC22654@elte.hu> (raw)
In-Reply-To: <8FED46E8A9CA574792FC7AACAC38FE7714FED213BE@PDSMSX501.ccr.corp.intel.com>


* Ma, Ling <ling.ma@intel.com> wrote:

> Hi Ingo
> 
> Thanks for your correction, so we use perf stat --repeat 3 to test 
> volano, tbench, and kbuild, Because netperf has multiple items we may 
> send out later.
> 
> volano_Os:

>  18680627716893  cycles                   #   2925.196 M/sec   ( +-   0.339% )
>   7247421283541  instructions             #      0.388 IPC     ( +-   0.124% )
>    226838591574  cache-references         #     35.521 M/sec   ( +-   0.971% )
>      9420427393  cache-misses             #      1.475 M/sec   ( +-   0.897% )

> volano_O2:

>  17145170491943  cycles                   #   2918.985 M/sec   ( +-   0.288% )
>   7324126478801  instructions             #      0.427 IPC     ( +-   0.090% )
>    219064318074  cache-references         #     37.296 M/sec   ( +-   0.792% )
>      9491237013  cache-misses             #      1.616 M/sec   ( +-   0.439% )

> O2 is better than Os for volano
> O2 is not different with Os for tbench
> O2 is not different with Os for kbuild 

Ok, this looks pretty credible, thanks for going through it.

For Volano, the difference is 8.9%, well above the 0.3% noise level, so 
it's significant.

Would it be possible to do a 'perf record' and 'perf report' comparison 
between two volano runs, to see where the nearly 10% overhead comes 
from? It might be one or two functions mis-optimized by GCC perhaps. Or 
it could be across-the-spectrum slowdown.

Note that the number of instructions increased only by 1%, but the 
overhead by 9%. So we might be hitting some nasty corner case - or it 
might be some caching effect. (which does not seem to be supported by 
the numbers though - the LLC cache-misses does not look significantly 
higher in the Os case)

'perf annotate fn_name' will also help you see where the overhead 
hot-spots are. If you build the vmlinux via CONFIG_DEBUG_INFO the perf 
annotate output will interleave assembly and source code output. 
(otherwise it will be assembly output only)

You probably want to use the latest version of 'perf' for all that 
analysis, from:

  http://people.redhat.com/mingo/tip.git/README

Thanks,

	Ingo

      parent reply	other threads:[~2009-12-02  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26  8:05 [PATCH RFC] [X86] Compile Option Os versus O2 on latest x86 platform ling.ma
2009-11-26  9:49 ` Ingo Molnar
2009-12-01  8:54   ` Ma, Ling
2009-12-01 10:14     ` Arjan van de Ven
2009-12-01 16:11       ` H. Peter Anvin
2009-12-03 15:03       ` Ma, Ling
2009-12-03 15:05         ` H. Peter Anvin
2009-12-03 15:31           ` Ingo Molnar
2009-12-03 15:46             ` H. Peter Anvin
2009-12-02  9:47     ` Ingo Molnar [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=20091202094730.GC22654@elte.hu \
    --to=mingo@elte.hu \
    --cc=arjan@infradead.org \
    --cc=davej@redhat.com \
    --cc=hpa@zytor.com \
    --cc=ling.ma@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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