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

基于泰晓RISC-V实验箱的Linux公开课
请稍侯

泰晓资讯·1 月 / 第五期 / 2022

unicornx 创作于 2022/01/27

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

  • Linux 内核最新消息

https://lkml.org/lkml/2022/1/23/26

由于假期和家人外出旅行,Linus Torvalds 提前一天发布了 Linux 5.17-rc1,这标志着 Linux 5.17 合并窗口期的结束。虽然有点提前,但所有主要的 PR 都合并了。

Linus 先生对 Linux 5.17-rc1 的总结是这样的:"5.17 doesn't seem to be slated to be a huge release, and everything looks fairly normal. We've got a bit more activity than usual in a couple of corners of the kernel (random number generator and the fscache rewrite stand out), but even with those things, the big picture view looks very much normal: the bulk is various driver updates, with architectures updates, documentation, and tooling being the bulk of the rest. Even with a total rewrite, that fscache diff looks more like a blip in the big picture." 看起来 5.17 似乎不会是一个巨大的版本,一切看起来都相当正常。

Linux 5.17 带来了许多新的特性,详细介绍请看我们本期资讯 “Linux 5.17 新功能一览”。

从过去几天的基准测试来看,到目前为止 5.17 这个版本看起来还不错,没有检测到可怕的性能衰退。更多 Linux 5.17 的基准测试还在进行中。

https://www.kernel.org/ updated by 2022/1/27

分支类型版本发布时间
mainline5.17-rc12022-01-23
stable5.16.22022-01-20
longterm5.15.162022-01-20
longterm5.10.932022-01-20
longterm5.4.1732022-01-20
longterm4.19.2252022-01-11
longterm4.14.2622022-01-11
longterm4.9.2972022-01-11
longterm4.4.2992022-01-11
linux-nextnext-202201252022-01-25

关键词: Linux

  • Linux 5.17 新功能一览

This morning marked the release of Linux 5.17-rc1 that officially ends the merge window for this next stable kernel series. Linux 5.17 won’t see its stable debut until around the end of March but there is a lot to get excited about for this open-source kernel in 2022.

23 日 Linux 5.17-rc1 发布了,正式结束了下一个稳定内核系列的合并窗口。Linux 5.17 的正式稳定版本要到 3 月底左右才能发布。

Linux 5.17 的新特性中令人感到兴奋的包括:对 AMD P-State 驱动程序的支持,该驱动程序在过去几个月中一直在与 Valve 合作进行针对 Steam Deck 的审查的测试;对 Intel Raptor Lake 的早期支持,针对 Intel Alder Lake P 显卡的支持状态已经被标记为稳定版;为即将发布的 AMD 处理器做了大量准备;初步支持最近推出的 Qualcomm Snapdragon 8 Gen 1,许多针对平板电脑和笔记本电脑的支持改进;x86 straight line speculation mitigation 支持,支持低成本 RISC-V 平台等,以下是摘录的一些有关处理器架构的汇总信息:

  • 新的 AMD P-State 驱动程序!这旨在为支持 ACPI CPPC 的 Zen 2 和更新的系统(主要用于台式机和移动设备)提供更好的节能效果。
  • Alder Lake mobile 的重要性能修复。
  • RISC-V sv48 支持 4 级页表支持,能够支持高达 128TB 的虚拟地址空间和 64TB 的物理内存。详细介绍请看我们本期资讯 “Linux 5.17 中针对 RISC-V 添加了 sv48 支持”。
  • RISC-V 重启支持,无需特殊驱动程序。详情见本月第四期资讯介绍。
  • Intel Raptor Lake 的早期准备工作,预计在未来的内核版本中还会有更多变化。
  • 为 AMD SMCA 下一代 CPU 做准备。
  • KVM 虚拟化中的 Intel AMX 支持。
  • 对 StarFive JH7100 的支持,这是第一个可用的低成本 RISC-V 平台。详情见本月第三期资讯介绍。
  • 对 Qualcomm Snapdragon 8 Gen 1 和 Snapdragon X65 的支持。这款最新的高通硬件是在 11 月底才发布的,所以很高兴内核主线如此迅速地实现对它们的支持。
  • ……

更多更详细的描述请参考原文新闻出处,“Linux 5.17 Features From New AMD P-State To Xilinx Drivers, Lots Of New Hardware” https://www.phoronix.com/scan.php?page=article&item=linux-517-features&num=1

关键词: Linux

  • Linux 5.17 中针对 RISC-V 添加了 sv48 支持

In addition to Linux 5.17 bringing support for the low-cost StarFive RISC-V platform among other RISC-V updates, more changes for this royalty-free processor ISA were sent in on Friday.

Linux 5.17 中除了对低成本 StarFive RISC-V 平台的支持之外,上周五又增加了更多针对该开源免费体系架构 ISA 的支持,其中最值得注意的是提供了 sv48 支持。

RISC-V sv48 支持 48 位虚拟地址空间,借助四级页表,RISC-V 64 位内核现在可以寻址高达 128TB 的虚拟地址空间,并且允许访问多达 64TB 的物理内存。当然,我们还没有看到任何高端 RISC-V 服务器平台能够支持这么大的容量,这只是对未来有好处。

Linux 5.17 可以在运行时自动检测是否支持 sv48,如果硬件不支持 sv48 则回退到 3 级页表支持。Linux 支持 sv48 的补丁至少可以追溯到 2020 年,并且在准备好进入主线之前已经经历了多轮审查。

原文新闻出处,“Linux 5.17 Adds RISC-V sv48 Support For Being Able To Handle More Memory” https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.17-RISC-V-sv48

关键词: Linux,RISC-V,sv48

  • Linux 5.17 使得针对内核配置调试功能更加方便

Over the years the Linux kernel has picked up many different sanitizers, memory leak detectors, and other features for helping to diagnose and address deficiencies in the kernel. However, all of these debugging-optimized features aren’t centrally located that can make it difficult for system administrators and developers to spot these numerous features when configuring a kernel build manually. Now with Linux 5.17 that is changing.

多年来,Linux 内核中加入了诸如 sanitizers, memory leak detectors 等许多特性来帮助诊断和解决内核中的代码缺陷。但是,所有这些调试优化的特性配置分散在多个地方,没有集中放置,这使得系统管理员和开发人员在手动配置内核构建时很难管理这些众多特性。

针对这个问题,Linux 5.17 引入了 debug.config 作为默认内核构建配置,该配置针对调试进行了优化。默认情况下,debug.config 将启用各种功能,例如 Kernel Address Sanitizer、Undefined Behavior Sanitizer、KMemLeak,以及以后的其他新功能,这有助于帮助调试或跟踪内核问题。这样我们只要运行一条命令就可以获得一个官方推荐的内核配置并启用了这么多不同的调试功能。

提交 debug.config 补丁的 Qian Cai 在提交中指出,"Some general debugging features like kmemleak, KASAN, lockdep, UBSAN etc help fix many viruses like a microscope. On the other hand, those features are scatter around and mixed up with more situational debugging options making them difficult to consume properly. This cold help amplify the general debugging/testing efforts and help establish sensitive default values for those options across the broad. This could also help different distros to collaborate on maintaining debug-flavored kernels. The config is based on years' experiences running daily CI inside the largest enterprise Linux distro company to seek regressions on linux-next builds on different bare-metal and virtual platforms."。也就是说,Linux 5.17 的 debug.config 提供了推荐的默认值,统一维护这些原本分散的配置内容将非常有助于统一大家的行为,增加不同发行版之间的协作,分享多年来在那些大企业和 Linux 发行公司内部运行日常 CI 的经验。

此外,Linux 5.17 还添加了 make mod2noconfig,此 mod2noconfig 选项旨在将构建模块化的内核转换为单个非模块化的内核。

更多介绍请阅读新闻出处,“Linux 5.17 Making It Easier To Build A Kernel With All The Shiny Debug Features”: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.17-debug-config

关键词: Linux, Debug

  • SiFive 将产品研发重心转移到下一代 HiFive 开发板

SiFive’s HiFive Unmatched is the best, readily available RISC-V developer board at the moment with enough horsepower for modest development/porting work and continues seeing improvements with the mainline Linux kernel. But availability on HiFive Unmatched is beginning to dry up and SiFive isn’t planning on any further production runs as it begins focusing on the board’s successor.

来自 SiFive 的 HiFive Unmatched 是目前最好的已经正式上市的 RISC-V 开发板,具有足够的性能配置,配备有 SiFive 的 Freedom U740 SoC、16GB DDR4 内存、microSD 和 M.2 NVMe SSD 存储支持、一个 PCIe x16 插槽和千兆以太网。适用于目前的开发和移植工作,主线 Linux 内核也在持续增加对该开发板的支持。但是随着 HiFive Unmatched 的潜力逐渐被挖掘殆尽,同时也是因为产能的不足,再加上市场需求超出了本已很高的预期,Unmatched 的库存即将售罄。SiFive 目前已开始专注于下一款即将于 2022 年发布的 Unmatched 的继任者,而不是试图在 2022 年构建另一个 HiFive Unmatched 平台。具体可以参考来自 SiFive 的 Phil Dworsky 最近发表的一篇文章(文章原文在 https://forums.sifive.com/t/sifive-update-on-hifive-unmatched-boards-in-2022/5569?s=09),文章原话摘录如下:"With such great ecosystem adoption, demand has exceeded our already high expectations, and we’re close to selling out our production inventory. Given the challenge of supply chain issues that we overcame for the first run of these boards (issues that we continue to face), we’ve decided to focus on the next generation SiFive HiFive development systems rather than trying to put together another build of the HiFive Unmatched platform in 2022."

Dworsky 最后说:"Our sincere apologies to anyone wanting a SiFive HiFive Unmatched board who has been unable to obtain one – please stay tuned for news on the next generation HiFive development systems soon."

让我们拭目以待,看看 SiFive 可以在 2022 年提供什么样的新的开发板,更快的 SoC 肯定会很好。有些人还对支持 socketed RAM 感兴趣。总的来说,人们对低价位的开发板的兴趣和解决方案一定会越来越多。

更多介绍请阅读新闻出处,“SiFive Shifting Production Focus To Next-Gen HiFive Development Board”: https://www.phoronix.com/scan.php?page=news_item&px=SiFive-2022-Focus

关键词: SiFive, RISC-V, HiFive Unmatched

  • Cemu 模拟器计划 2022 年开源,旨在获得 Linux 支持

Cemu as one of the leading Nintendo Wii U video game emulators is planning to go open-source this year and is also working on Linux support and related cross-platform advancements.

Cemu 是一款 Wii U 视频游戏机模拟器,自 2015 年以来一直只支持 Windows,尽管因封闭源代码而受到批评,但已经取得了很大的成功。但在 2022 年,Cemu 计划开源其源代码,并向社区贡献者开放其开发过程。

Cemu 还在开发其 Linux 版本,已经完成了大约 “70%”,但还需要解决其他各种问题才能实现这一目标。 Cemu 一直致力于切换到采用现代 C++ 开发以及使用 Makefile 构建系统,此外 Cemu 还希望从 DirectAudio/XAudio、H.264 软件解码切换为采用 Cubeb 作为音频后端,从而实现平台无关性,这样就不用和 Windows 的 DXVA2 绑定。

另一个有趣的任务是实现一个新的 shader compiler,从而实现从 Wii U shader 方案迁移到采用 GLSL 或 SPIR-V。为了实现这个计划还需要一个 CPU JIT 后端,譬如使用 LLVM 将 Wii U PowerPC 代码转换为原生 x86 代码。目前,Cemu 依赖于自定义转换器从 Wii U 二进制文件转换为 x86 执行,希望采用 LLVM 后,将使 Cemu 能够在更多架构上运行。

有关 Cemu 路线图和规划的更多详细信息,请访问 cemu.info:https://wiki.cemu.info/wiki/Roadmap

更多介绍请阅读新闻出处,“Cemu Emulator Plans For 2022 With Going Open-Source, Aiming For Linux Support”: https://www.phoronix.com/scan.php?page=news_item&px=Cemu-2022-Plans

关键词: Cemu

  • 高性能链接器 Mold 发布 1.0.2

Mold 1.0 came at the end of 2021 for this project developed by Rui Ueyama who is also known as the original developer of LLVM’s LLD linker. Mold 1.0 is considered stable and production ready while delivering very promising results compared to LLVM’s LLD or GNU’s Gold linkers. Mold has been generating interest among developers and now Mold 1.0.2 is out this Sunday with fixes and minor updates.

对于那些对编译器感兴趣的人来说,被称为 “现代链接器”的 Mold 是 2022 年值得关注的有趣项目之一。

Mold 1.0 于 2021 年底推出,该项目由 Rui Ueyama 开发,他也是 LLVM 的 LLD 链接器的始作俑者。与 LLVM 的 LLD 或 GNU 的 Gold 链接器相比,Mold 1.0 被认为是稳定和产品级的,同时提供了非常高的性能。 Mold 引起了开发人员的兴趣,现在 Mold 1.0.2 于本月 23 日发布,其中包含修复和小更新。

Mold 正在努力实现 link-time optimization (LTO),但如果需要 GCC/LLVM 的 LTO,Mold 1.0.2 将回退到使用 ld.bfd 或 ld.lld。这至少不会破坏构建,这是在 Mold 的原生 LTO 支持准备好之前需要注意的。Mold 1.0.2 现在还支持其他链接器支持的更多选项,ARM64 的 range extension 现在已经就绪,对 NetBSD 上的 Mold 的支持正在开发中,在 x86_64 上支持使用 “-z now” 实现压缩后长度为 8-byte 的 PLT 项代替缺省的 16-byte 长度以及支持 RELR 类型的动态重定位。

先前 Mold 项目的基准测试结果展示了非常引人注目的链接器性能。1.0.2 版本中通过重写脚本处理,Mold 的性能进一步得到了改进。重定位处理中不涉及内存分配的部分也得到了优化,这对于含有有大量调试信息的二进制文件的执行速度的提高有帮助。

Mold 1.0.2 也修复了许多错误,包括处理大于 4GiB archive 文件的能力。有关 Mold 1.0.2 更改的更多详细信息,请访问项目的 GitHub: https://github.com/rui314/mold/releases/tag/v1.0.2

更多介绍请阅读新闻出处,“Mold 1.0.2 Released For This High Performance Linker”: https://www.phoronix.com/scan.php?page=news_item&px=Mold-1.0.2-Released

关键词: Mold

  • LLVM Clang 现在默认使用 DWARFv5 调试格式

Following GCC, the LLVM Clang C/C++ compiler front-end is now defaulting to using the DWARFv5 debugging data format.

在 GCC 之后,LLVM Clang C/C++ 编译器前端现在也默认使用 DWARFv5 作为调试数据的格式。

DWARFv5 于 2017 年发布,与十年前的 DWARFv4 相比,它提供了更快的符号搜索、更好的优化代码调试、改进的数据压缩、改进了代码的某些元素的描述、新的语言代码以及其他改进。DWARFv5 规范和更多详细信息可以在 dwarfstd.org (https://dwarfstd.org/Dwarf5Std.php) 上找到。

GCC 从 11 开始默认使用 DWARFv5 调试格式,而现在 LLVM 的 Clang 前端也紧跟其步伐,使用 DWARFv5 作为其默认设置。此更改将在 LLVM 14 中生效。如果您还想继续使用旧的 DWARFv4 格式,可以在编译时加上 “-gdwarf-4” 的选项。此外,默认情况下,Darwin (macOS)、Android 和 SCE 将仍然继续使用 DWARFv4。

更多介绍请阅读新闻出处,“LLVM Clang Now Defaulting To The DWARFv5 Debug Format”: https://www.phoronix.com/scan.php?page=news_item&px=LLVM-Clang-DWARFv5-Default

关键词: LLVM,Clang,DWARFv5

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: