Skip to content

Commit 3a55fb0

Browse files
Kirill Smelkovtorvalds
authored andcommitted
Tell the world we gave up on pushing CC_OPTIMIZE_FOR_SIZE
In commit 281dc5c ("Give up on pushing CC_OPTIMIZE_FOR_SIZE") we already changed the actual default value, but the help-text still suggested 'y'. Fix the help text too, for all the same reasons. Sadly, -Os keeps on generating some very suboptimal code for certain cases, to the point where any I$ miss upside is swamped by the downside. The main ones are: - using "rep movsb" for memcpy, even on CPU's where that is horrendously bad for performance. - not honoring branch prediction information, so any I$ footprint you win from smaller code, you lose from less code density in the I$. - using divide instructions when that is very expensive. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fbfc23e commit 3a55fb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ config CC_OPTIMIZE_FOR_SIZE
11821182
Enabling this option will pass "-Os" instead of "-O2" to gcc
11831183
resulting in a smaller kernel.
11841184

1185-
If unsure, say Y.
1185+
If unsure, say N.
11861186

11871187
config SYSCTL
11881188
bool

0 commit comments

Comments
 (0)