提交 3a55fb0d 编写于 作者: K Kirill Smelkov 提交者: Linus Torvalds

Tell the world we gave up on pushing CC_OPTIMIZE_FOR_SIZE

In commit 281dc5c5 ("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: NKirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 fbfc23ef
...@@ -1182,7 +1182,7 @@ config CC_OPTIMIZE_FOR_SIZE ...@@ -1182,7 +1182,7 @@ config CC_OPTIMIZE_FOR_SIZE
Enabling this option will pass "-Os" instead of "-O2" to gcc Enabling this option will pass "-Os" instead of "-O2" to gcc
resulting in a smaller kernel. resulting in a smaller kernel.
If unsure, say Y. If unsure, say N.
config SYSCTL config SYSCTL
bool bool
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册