From: ling.ma@intel.com
To: mingo@elte.hu
Cc: hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org,
Ma Ling <ling.ma@intel.com>
Subject: [PATCH RFC] [X86] Compile Option Os versus O2 on latest x86 platform
Date: Thu, 26 Nov 2009 16:05:52 +0800 [thread overview]
Message-ID: <1259222752-8161-1-git-send-email-ling.ma@intel.com> (raw)
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
next reply other threads:[~2009-11-26 8:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-26 8:05 ling.ma [this message]
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
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=1259222752-8161-1-git-send-email-ling.ma@intel.com \
--to=ling.ma@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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
Powered by JetHome