aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorLinus Torvalds2011-05-22 16:30:36 -0500
committerLinus Torvalds2011-05-22 16:30:36 -0500
commit281dc5c5ec0fb299514567cbc358562649c1af95 (patch)
tree2ecb019795e99147ce8d90b5e97c2bc3051f7855 /init
parent71a8638480eb8fb6cfabe2ee9ca3fbc6e3453a14 (diff)
downloadkernel-common-281dc5c5ec0fb299514567cbc358562649c1af95.tar.gz
kernel-common-281dc5c5ec0fb299514567cbc358562649c1af95.tar.xz
kernel-common-281dc5c5ec0fb299514567cbc358562649c1af95.zip
Give up on pushing CC_OPTIMIZE_FOR_SIZE
I still happen to believe that I$ miss costs are a major thing, but sadly, -Os doesn't seem to be the solution. With or without it, gcc will miss some obvious code size improvements, and with it enabled gcc will sometimes make choices that aren't good even with high I$ miss ratios. For example, with -Os, gcc on x86 will turn a 20-byte constant memcpy into a "rep movsl". While I sincerely hope that x86 CPU's will some day do a good job at that, they certainly don't do it yet, and the cost is higher than a L1 I$ miss would be. Some day I hope we can re-enable this. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig1
1 files changed, 0 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 4986ecc49e6..ffcdad793f1 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -908,7 +908,6 @@ endif
908 908
909config CC_OPTIMIZE_FOR_SIZE 909config CC_OPTIMIZE_FOR_SIZE
910 bool "Optimize for size" 910 bool "Optimize for size"
911 default y
912 help 911 help
913 Enabling this option will pass "-Os" instead of "-O2" to gcc 912 Enabling this option will pass "-Os" instead of "-O2" to gcc
914 resulting in a smaller kernel. 913 resulting in a smaller kernel.