public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] [X86] Compile Option Os versus O2 on latest x86 platform
@ 2009-11-26  8:05 ling.ma
  2009-11-26  9:49 ` Ingo Molnar
  0 siblings, 1 reply; 10+ messages in thread
From: ling.ma @ 2009-11-26  8:05 UTC (permalink / raw)
  To: mingo; +Cc: hpa, tglx, linux-kernel, Ma Ling

From: Ma Ling <ling.ma@intel.com>

Hi All

In current kernel compile original option we prefer Os to O2. Os will reduce
compiled kernel code size obviously, and O2 pay more attention to performance
than code size, so in real environment O2 will bring more i-cache miss than Os,
totally performance should slowdown.

In our system test machine kernel code size from Os is 12M, and that from O2 is 14M.
 
But we have two questions about it on latest platform: 
1. 10% * current kernel code size from Os(CPU execution path)
   is far more L1 i-cache size, the difference of i-cache-miss counts from
   both options should become little.
2. our latest platform should has excellent prefetch capability by adjusting
   predication execution path.

Based on above reasons we re-compiled linux kernel with O2 option on below platform.
CPU type: 2P Quad-core Core i7(2 socket*4 core *2 hyper threads)
CPU frequency: 2670MHz
Memory: 6 x 1GBMb

We mainly tested common and stable benchmarks two times,  results show
O2 performance is better than Os (linux kernel version 2.6.32-rc8)  

Benchmarks:                          improvement 
volano                                8%
netperf                               6.7% 
tbench                                6.45%
Kbuild                                5.5% (3 time test, average improvement)
specjbb2000                           2%
fio                                   2%
specjbb2005                           No change
cpu2000                               No change
aim7                                  No change
hackbench                             No Change
oltp                                  No Change

This patch try to enable O2 option and disable Os option.

Appreciate any comments.

Thanks
Ling

---
 arch/x86/configs/x86_64_defconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 6c86acd..d564b90 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -126,7 +126,7 @@ CONFIG_INITRAMFS_SOURCE=""
 CONFIG_RD_GZIP=y
 CONFIG_RD_BZIP2=y
 CONFIG_RD_LZMA=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=n
 CONFIG_SYSCTL=y
 CONFIG_ANON_INODES=y
 # CONFIG_EMBEDDED is not set
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-12-03 15:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox