Signed-off-by: owen-carter <ouwenniu@qq.com>翻译完成

This commit is contained in:
owen-carter 2014-05-20 15:15:07 +08:00
parent d0c8e8963e
commit 44b63df069
2 changed files with 40 additions and 37 deletions

View File

@ -1,37 +0,0 @@
owen-carter translating
Torvalds Is Unconvinced By LTO'ing A Linux Kernel
================================================================================
Yesterday patches were published via a pull request to [enable experimental LTO support for the Linux 3.15 kernel][1], but Linus Torvalds hasn't yet decided whether he will accept this code in the upstream Linux kernel... Linus doesn't yet see the benefits in link-time optimizations for the kernel and isn't sure whether this code is ready yet to be mainlined.
[LTO'ing the Linux kernel][2] has the potential of reducing the size of the Linux kernel image along with generating a faster and more efficient binary. Link-time optimizations within GCC allow the whole program to be optimized at link-time stage across the entire binary. Previous results showed that an LTO'ed kernel could be over 10% smaller in size and a few percent faster by optimizing the kernel in this manner, but it currently results in much greater system memory usage and a much longer compilation process.
In responding to the Linux 3.15 LTO Kconfig pull request that would make it an experimental option for the next kernel release, Linus Torvalds [wrote][3]:
> So right now, I see several reasons not to merge it ("It's so experimental that we don't even want to encourage people to test it" to "it's not fully fleshed out yet and makes compile times _much_ longer").
>
> And yet nobody has actually talked about why I *should* merge it.
>
> Which - I think understandably - makes me less than enthusiastic.
>
> So I think I'll let this wait a bit longer, _unless_ people start talking about the upsides. How much smaller is the end result? How much faster is it? How much more beautiful is it? Does it make new cool things possible? Are those cool things really close on the horizon and really want this merged even though it's not really quite ready yet?
>
> So please: convince me. Andi?
>
> Linus
In response to Torvalds' concerns, among the responses back were that the LTO kernels are smaller in size, they reduce the need for many lower-level Kconfig symbols / reduce the number of CONFIG options needed since unused code can automatically be eliminated, etc. Numbers reported by Tim Bird saw an 11% binary reduction on ARM with the LTO configuration while other users can see upwards of a 30% reduction. There's also reports of an LTO kernel having about 4% less system calls. Benchmark results vary based upon workload but can range from no improvement to generally a couple of percent.
At the moment the matter of [link-time optimization][4] support for the Linux kernel is still being discussed with Linus not yet coming out with any revised thoughts whether he's willing to merge this experimental feature for Linux 3.15 or not.
--------------------------------------------------------------------------------
via: http://www.phoronix.com/scan.php?page=news_item&px=MTY1OTg
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.phoronix.com/scan.php?page=news_item&px=MTY1ODA
[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTY0OTc
[3]:http://lkml.iu.edu/hypermail/linux/kernel/1404.1/00275.html
[4]:http://www.phoronix.com/scan.php?page=search&q=link-time+optimization

View File

@ -0,0 +1,40 @@
owen-carter translating
托沃兹对LTO'ing Linux内核并不乐观
================================================================================
昨天,补丁已经通过一个上拉请求而发布[启用了Linux 3.15内核实验LTO支持][1]但Linus Torvalds还没有决定他是否会接受这段代码中的上游Linux内核...莱纳斯还没有见到在链接时优化内核的好处是不知道这段代码是否已准备好待mainlined。
[LTO'ing the Linux kernel][2] 具有减小伴随生成一个更快和更高效的二进制Linux内核镜像的大小的优势。在GCC链接时就进行优化从而使整个程序在链接阶
段就实现整个的二进制优化。先前的结果表明一个LTO'ed内核可以是较小的超过10的大小和百分之几更快通过优化内核以这种方式但是它目前的问题是导致了更大的系统内存使用和更长的编译过程。
在应对Linux的3.15 LTO的Kconfig拉的请求后将使它成为实验性的选项为下一个内核版本Linus Torvalds[wrote][3]:
> 所以现在,我看到了好几个不进行合并的原因("它是如此的实验性,我们甚至不希望鼓励人们去测试它”,因为目前“它不是完全充实并且使得编译时间变的更长").
>
> 而且至今没有人真正谈过为什么我 *应该* 合并它Linus的意思是说其实没有人真正知道并且谈过合并LTO的理由
>
>我觉得这个并没有激起我多少热情。
>
>所以我想我会让这个等待的时间尽量长一点,直到人们开始谈论有利的一面。最终的结果是到底可以小到什么程度呢?快到什么程度呢?漂亮到何种
境地呢?这会让那些新的很酷的事情成为可能吗?那些很酷的事情真地快要来到了吗?真的希望这个可以被合并,尽管这不是真的准备好了?
>
>所以,请说服我。安迪!
>
> Linus
为了回应Torvalds的关注响应的结果是LTO内核具有了更小的尺寸它们减少了对许多低级别的Kconfig符号/减少所需的配置选项的数目因为未使用的代码可以自动被淘汰大量由Tim bird得到的报告显示一个11的二进制减少在ARM与LTO配置中而其他用户可以看到向上减少30。还有的甚至减少
约4系统调用了LTO内核的报告。基准测试的结果根据测试工作量有所差异但可以从一般是几个百分点的进步看到确实得到了改善。
如今, [link-time optimization][4] 是否被Linux内核所支持该决策仍在与莱纳斯尚未明朗的想法中他是否愿意合并此实验性功能的Linux 3.15或不做讨论。
--------------------------------------------------------------------------------
via: http://www.phoronix.com/scan.php?page=news_item&px=MTY1OTg
译者:[owen-carter](https://github.com/owen-carter) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.phoronix.com/scan.php?page=news_item&px=MTY1ODA
[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTY0OTc
[3]:http://lkml.iu.edu/hypermail/linux/kernel/1404.1/00275.html
[4]:http://www.phoronix.com/scan.php?page=search&q=link-time+optimization