泰晓科技 -- 聚焦 Linux - 追本溯源,见微知著!
网站地址:https://tinylab.org

泰晓Linux知识星球:1300+知识点,520+用户
请稍侯

泰晓资讯·2 月 / 第二期 / 2022

unicornx 创作于 2022/02/25

“泰晓资讯”,广泛报道 “Linux/开源” 业界资讯。欢迎广大读者投递相关资讯来源和素材,本站将进一步收集整理后发布给大家。

  • Linux 内核最新消息

https://lkml.org/lkml/2022/2/20/305

Linus Torvalds 于本周初发布了 Linux 5.17-rc5,仍旧是另一个例行更新,并没有特别引人注意的事情发生,一切都在按计划发布。

Torvalds 在 5.17-rc5 公告中评论说,"Things continue to look pretty much normal. There are fixes all over the place, but no more than usual for this time of the release. And the statistics look normal too, with most of the changes being to drivers. The diffstat looks a bit unusual with the Intel iwlwifi driver showing a lot of modification, but it's almost entirely due to removal of the deprecated broadcast filtering that doesn't even work with newer firmware. Outside the driver subsystems, it's mostly arch updates (kvm shows up a lot again), tooling and networking."

按计划,Linux 5.17 稳定版将于 3 月中下旬发布,并将被 Fedora 36 和许多其他会在春季发行的 Linux 发行版采用。可惜的是,Ubuntu 22.04 LTS 因为发布时间较早,和 v5.16 / v5.17 完美错过,所以只能使用 Linux 5.15。

https://www.kernel.org/ updated by 2022/2/25

分支类型版本发布时间
mainline5.17-rc52022-02-20
stable5.16.112022-02-23
longterm5.15.252022-02-23
longterm5.10.1022022-02-23
longterm5.4.1812022-02-23
longterm4.19.2312022-02-23
longterm4.14.2682022-02-23
longterm4.9.3032022-02-23
longterm4.4.302 [EOL]2022-02-03
linux-nextnext-202202232022-02-24

关键词: Linux

  • Linux 内核的改进将使 getrandom() 性能提升 80 倍

The Linux kernel’s random number generator code has been seeing a number of improvements recently led by Jason Donenfeld of WireGuard fame.

在 Linux 5.17 中,因开发 WireGuard 而被大家所知晓的程序员 Jason Donenfeld 主导改进了 Linux 内核的随机数生成器代码。主要修改是将其原先使用的 SHA1 替换为 BLAKE2,以及其他性能和安全性改进。在 Linux 5.18中,他正在对这部分代码继续进行更多改进。Donenfeld 一直在为此做准备,以便在 3 月下旬启动 5.18 的合并窗口时将其提交。

还需要注意的一个令人兴奋的变化是 getrandom() 系统调用在新内核下将会快得多。用于获取随机字节内容的 getrandom() 调用使用正在开发的最新代码产生了更快的性能。来自的 Intel 的测试数据表明,采用 stress-ng 测试 getrandom() 发现性能提高了百分之 8450(是的,提高了 8450%)。

Donenfeld 给出的解释原文是: "Rather than the clunky NUMA full ChaCha state system we had prior, this commit is closer to the original "fast key erasure RNG" proposal from, by simply treating ChaCha keys on a per-cpu basis...The result is a bit simpler than before and has fewer foot guns. The init time state machine also gets a lot simpler as we don't need to wait for workqueues to come online and do deferred work. And the multi-core performance should be increased significantly, by virtue of having hardly any locking on the fast path."

此项改进的最大收益者应该是那些有着巨大 cpu 核心数的服务器(例如 Intel),现代的多核台式机也应该会从中受益匪浅。

原文新闻出处,“Linux’s getrandom() Sees A 8450% Improvement With Latest Code” https://www.phoronix.com/scan.php?page=news_item&px=Linux-getrandom-8450p

关键词: Linux, random

  • Linux 社区讨论弃用 ReiserFS

Besides no discussion in years over possibly upstreaming Reiser4 nor have any been brought up about eventually trying to mainline Reiser5, it looks like the original and feature-rich for its original time ReiserFS file-system could be on its way out of the Linux kernel in 2022.

ReiserFS 于 21 年前作为 Linux 内核的第一个日志文件系统被引入,可以说在早期的开源文件系统中是一种创新。有一段时间 ReiserFS 在 SUSE Linux 上作为默认的文件系统使用,并一直处于积极的功能开发状态中。但是,自从 ReiserFS 的主要开发人员 Hans Reiser 在 15 年前因谋杀妻子而被判有罪以来,除了前 Namesys 雇员 Edward Shishkin 还在为该项目做贡献外,ReiserFS(或 Reiser4)并没有太多的进展。虽然 Shishkin 一直在主线外维护并推进 Reiser4/Reiser5,但 ReiserFS 基本上已经随着用户兴趣的减少而逐渐没落了,鉴于它与 Hans Reiser 的联系,似乎没有公司愿意参与其中。再加上现在 EXT4、XFS 和 Btrfs 都是更好的选择,甚至包括 OpenZFS。

在本周由资深内核开发人员 Matthew Wilcox 发起了一次关于删除 ReiserFS 的讨论。Wilcox 希望删除 ReiserFS 的动机是由于他正在研究对内核基础架构进行更改,但 ReiserFS 是唯一会阻止他工作的模块。除了 Wilcox 之外,其他内核开发人员也表示有兴趣弃用和删除该文件系统。 ReiserFS 可能会在其被实际删除之前在几个内核版本中被弃用,这一直是删除内核功能的常见做法。

从目前的评论来看,看起来 ReiserFS 可能会在 2022 年被弃用,这将导致它最终会在未来的主线 Linux 内核版本中被移除。除此之外,Dave Chinner 还建议考虑弃用其他未维护的旧 Linux 文件系统。

更多更详细的描述请参考原文新闻出处,“Linux Developers Discuss Deprecating & Removing ReiserFS” https://www.phoronix.com/scan.php?page=news_item&px=ReiserFS-2022-Linux-Deprecation

关键词: Intel, ReiserFS

  • Intel 通过收购 Linutronix 加大对 Linux 的投资

Intel has a very exciting acquisition to announce this morning - not another hardware company, but they have acquired Linutronix to ramp up their investment in Linux/open-source engineering.

Intel 今天早上宣布了一项非常令人兴奋的收购,被收购的不是另一家硬件公司,而是总部位于德国的 Linux 咨询公司 Linutronix,该公司专注于嵌入式 Linux 和实时计算。Intel 收购 Linutronix 似乎主要是为了让 Linutronix 非常有才华的员工进入 Intel。在这些著名的 Linux 工程师中,最引人注目的是他们的首席技术官 Thomas Gleixner,他是 x86 平台上一位非常资深的内核维护者和重要贡献者,他在 Linux 上的贡献包括 CPU 安全处理,以及最值得注意的是对实时补丁 (PREEMPT_RT) 的维护工作。

Linutronix 领导了 Linux 在 PREEMPT_RT 方面的工作,尽管以前该项目一直受到资金短缺的挑战,现在加入财大气粗的 Intel 后,这个问题应该不复存在了吧。

Intel 收购 Linutronix 对实时内核前景来说是个好消息。早在 2020 年,由于缺乏资金,将 PREEMPT_RT 合并到 Linux 主线的工作曾一度被搁置。现在,随着 Linutronix 成为 Intel 的一部分,他们希望首要工作之一是就是将实时补丁上传到上游。Intel 在发布收购公告时特别重申了 Linutronix 在 PREEMPT_RT 上的工作。在过去的一年里,我们已经看到更多的 PREEMPT_RT 补丁在向上游提交,而现在在 Intel 的领导下,有望很快完成最终的工作。这对 Linux 和开源生态系统来说绝对是个好消息。

更多介绍请阅读新闻出处,“Intel Ramps Up Linux Investment By Acquiring Linutronix”: https://www.phoronix.com/scan.php?page=news_item&px=Intel-Acquires-Linutronix

关键词: Intel, Linutronix,PREEMPT_RT

  • 用 Rust 重新编写 GNU Coreutils 的工作进展神速

Along with the broader industry trend of transitioning security-sensitive code to memory-safe languages like Rust, there has been an effort to write a Rust-based replacement to GNU Coreutils. For nearly a year that Rust Coreutils has been able to run a basic Debian system while more recently they have been increasing their level of GNU Coreutils compatibility and in some cases now even outperforming the upstream project.

当前,人们愈加倾向于采用像 Rust 这样的内存安全语言,编写对安全敏感的代码,这俨然已成为一种流行的行业趋势,人们一直在努力用 Rust 重写 GNU Coreutils。近一年来,Rust Coreutils 已经能够在 Debian 系统上运行,而最近他们一直在提高 GNU Coreutils 的兼容性,在某些情况下甚至超过了原始项目。

GNU Coreutils 在 Linux 系统和其他平台上提供了一些常见且重要的命令行工具。GNU Core Utilities 包括常用的命令,如 cat、ls、rm、chmod、mkdir、wc、whoami 和许多其他命令。Sylvestre Ledru 和其他开发人员一直在开发基于 Rust 的 Coreutils 来代替 C 代码,转而使用这种以内存安全和安全为荣的现代编程语言。

Ledru 上月底在 Rust Coreutils 上发布了最新的 v0.0.12。现在每个月都有几十个贡献者为这项工作贡献 400 多个补丁。基于 Rust 的 Coreutils 不仅应该更安全,而且对于一些二进制文件,他们现在看到的性能比 GNU 包中的命令(如 head、cut 和其他常见命令)明显要更好。stty 是他们仅有的一个尚待实施的程序。我们可以通过 Sylvestre Ledru 的博客(https://sylvestre.ledru.info/blog/2022/01/29/an-update-on-rust-coreutils)了解有关 Rust Coreutils 当前状态的更多详细信息。该项目的代码托管在 GitHub 上,仓库地址是 https://github.com/uutils/coreutils

更多介绍请阅读新闻出处,“Rust-Written Replacement To GNU Coreutils Progressing, Some Binaries Now Faster”: https://www.phoronix.com/scan.php?page=news_item&px=Rust-Coreutils-Jan-2022

关键词: Rust, Coreutils

  • Mold 1.1 新增支持 Native LTO 和 RISC-V

Debuting last December was Mold 1.0 as a high performance, modern linker to compete with GNU’s Gold and LLVM’s LLD. That project was started by Rui Ueyama who originally worked on LLVM’s LLD and has been working aggressively on performance optimizations. Sunday night marked the release of Mold 1.1 as the latest major update to this linker.

去年 12 月首次亮相的 Mold 1.0 是一种高性能的现代链接器,可与 GNU 的 Gold 和 LLVM 的 LLD 竞争。该项目由最初从事 LLVM 的 LLD 工作的 Rui Ueyama 发起,并一直积极致力于性能优化。21 日晚,Mold 1.1 的发布标志着该链接器的又一次主要更新。

Mold 1.0 在几周前持续发布了几个小版本,然后就是 Mold 1.1。Mold 1.1 最值得注意的是现在提供原生(Native)的 Link-Time Optimization (LTO) 支持。Mold 以前在遇到用于支持 LTO 的链接器的 IR(Intermediate Representation)时会使用 ld.bdf/ld.lld 代替,而现在它可以自己处理 IR。 LTO 支持是通过类似于 GNU ld 和 GNU gold 的链接器插件接口实现的。Mold 目前最初版本的 LTO 支持侧重于完整性而不是性能,这至少意味着它仅比其他链接器 “稍微快一点”。

Mold 1.1 的另一大新增功能是添加了对 RISC-V CPU 架构的支持,其中 RV64 代码已被合并。已成功测试了链接 RISC-V 64 位上的各种程序。

Mold 1.1 的其他更改包括支持 -emit-relocs、在某些情况下随机打乱输入部分顺序的选项(例如 ASLR)、添加了 --print-dependencies 选项以及其他添加以及许多错误修复和兼容性改进。例如,Mold 1.1 现在可以使用 Musl libc 来构建。

有关 Mold 1.1 的更多详细信息,请参阅 GitHub 上的发布公告 https://github.com/rui314/mold/releases/tag/v1.1

更多介绍请阅读新闻出处,“Mold 1.1 High Performance Linker Brings Native LTO, RISC-V Support”: https://www.phoronix.com/scan.php?page=news_item&px=Mold-1.1-Released

关键词: Mold, LTO, RISC-V

联系我们

资讯内容部分来自 “LWN.net“。如果您对某些 LWN 文章感兴趣(譬如希望获得全文翻译的)请扫描二维码加微信联系我们:

tinylab wechat



Read Album:

Read Related:

Read Latest: