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

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

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

unicornx 创作于 2022/05/27

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

  • Linux 内核最新消息

https://lkml.org/lkml/2022/5/22/274

Linus Torvalds 本周按时发布了 Linux 5.18,这是目前最新一期的稳定内核版本。Torvalds 在简短的 v5.18 公告中写道,"No unexpected nasty surprises this last week, so here we go with the 5.18 release right on schedule. That obviously means that the merge window for 5.19 will open tomorrow, and I already have a few pull requests pending. Thank you everybody. I'd still like people to run boring old plain 5.18 just to check, before we start with the excitement of all the new features for the merge window."

Linux 5.18 中引入了备受争议的来自 Intel 的 Software Defined Silicon (SDSi) 功能、继续改进了 DG2/Alchemist Intel 独立显卡以使能了 Sapphire Rapids。5.18 还添加了对 Alder Lake N 和 DG2-G12 显卡的支持,优化了 AMD EPYC 的性能,支持了 FreeSync 视频模式和 Tesla Full-Self Drive (FSD) 芯片等等。

现在已进入新的针对下一个版本 Linux 5.19 的合并窗口期,“泰晓资讯” 将更多关注和为大家介绍 Linux 5.19 中提供的新功能。

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

分支类型版本发布时间
mainline5.182022-05-22
stable5.17.112022-05-25
longterm5.15.432022-05-25
longterm5.10.1182022-05-25
longterm5.4.1962022-05-25
longterm4.19.2452022-05-25
longterm4.14.2812022-05-25
longterm4.9.3162022-05-25
linux-nextnext-202205262022-05-26

关键词: Linux

  • Linux 5.19 最终删除了过时对 x86 的 a.out 格式支持

Way back in 2019 the Linux kernel deprecated a.out support given that it was superseded by ELF, which itself has already been supported for over two decades going back to Linux 1.x kernels. With Linux 5.19, the obsolete 32-bit x86 a.out support is finally being removed for good from the kernel.

早在 2019 年,Linux 内核就弃用了对 a.out 的支持,取代它的是 ELF。从 Linux 1.x 内核开始就支持 ELF,到目前有二十多年的历史了。在之前的内核版本 (Linux 5.18) 中,已不再支持为 m68k 和 Alpha 构建 a.out 格式的文件,从 Linux 5.19 开始,对过时的 32 位 x86 的 a.out 支持终于从内核中被永久删除

早在 3 月,我们就注意到有人提交了准备移除 32 位 x86 的 a.out 格式支持,而它错过了 v5.18,所以现在已准备好加入 5.19 这个新的内核周期。这种可执行/目标代码/共享库文件格式在 ELF 占主导地位之前使用,但在现代世界中没有真正的用途。这里提到的 a.out 和编译器默认生成的可执行文件名称叫做 “a.out” 并无关系,因为现代编译器早已采用 ELF 格式而不是 a.out 格式本身。 对 x86 a.out 格式的支持自 Linux 5.1 以来已被弃用,内核中删除对它的支持应该对现在的应用没有什么影响。

更多介绍请阅读新闻出处,“Linux 5.19 Finally Removes Obsolete x86 a.out Support​”: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.19-Drops-x86-a.out

关键词: Linux, a.out, ELF

  • 展望 RISC-V 在 5.19 内核上的新特性

With Linux 5.18 expected to be released as stable tomorrow and that opening up the Linux 5.19 merge window, feature work aimed for this next kernel should be largely wrapped up. Within the RISC-V architecture’s “for-next” branch is several interesting additions.

随着 Linux 5.18 的发布和 Linux 5.19 合并窗口的开启,我们得以一窥针对下一个版本的内核功能。在这里我们来看一下针对 RISC-V 架构的 “for-next” 分支中有哪些有趣的新特性。

概括来说,对于 Linux 5.19 周期,有关 RISC-V 架构的代码中的改进包括:允许 32 位 RISC-V 用户空间应用程序在 64 位 RISC-V 内核上运行的初步实现,新的 RISC-V 扩展工作,支持 kexec_file() 系统调用等等。以下是主要亮点。

  • 支持 RISC-V 上的 kexec_fileKexec_file_load 是 Linux 内核上比较新的 Kexec 系统调用。RISC-V 已经提供了 Kexec 支持,允许从当前运行的内核加载和引导到另一个内核。kexec_file 系统调用是基于文件的,它采用文件描述符传递内核和 initramfs,而不是 segment 列表。

  • 一个新的 ticket-based 的自旋锁系统,它使用通用 atomics 并且不需要像 qspinlocks 那样需要依赖内存系统来实现公平性。

  • 早期的 “COMPAT” 支持,能够在 S 模式配置下在 64 位内核上运行 32 位 U 模式。这种 COMPAT 支持是为了能够在 RISC-V 64 位内核上运行 32 位用户空间应用程序。

  • 支持 “Svpbmt” 扩展,即所谓的 “Supervisor-Mode: Page-Based Memory Types”,支持将内存页标记为不可缓存或用于 I/O面。还支持 Allwinner D1 的 page table attribute memory types。此外,该补丁系列还引入了 “RISCV_ALTERNATIVE” 选项,以便能够在运行时自动修补执行平台所需的勘误表。此代码修补在系统引导阶段执行。由于 Allwinner 的 D1 内存类型实现与最终的 Svpbmt 规范不同,因此引入了这个 RISC-V “ALTERNATIVE” 框架。

更多介绍请阅读新闻出处,“RISC-V With Linux 5.19 Preps “COMPAT” Mode For 32-bit Apps On 64-bit Kernels & More”: https://www.phoronix.com/scan.php?page=news_item&px=RISC-V-Linux-5.19

关键词: Linux, RISC-V

  • Rust For The Linux 最新进展

While not marked as a pull request yet for mainlining to the kernel, Miguel Ojeda this morning sent out an updated set of patches adding in the Rust programming language support for the Linux kernel. Separately, a new version of Uutils was released this weekend as the Rust language implementation of GNU Coreutils.

Miguel Ojeda 于 23 日早上提交了一组补丁,更新了 Linux 内核对采用 Rust 语言开发的支持。这是该补丁的第七次迭代,添加了在内核中构建 Rust 代码的基础设施,添加了各种抽象供 Rust 代码使用,以及一些示例代码来演示如何在内核空间使用这种有助于保证内存安全的编程语言为内核开发程序。出于安全原因,Rust for Linux 内核工作继续引起业界的极大兴趣,试图提高代码安全性。

在 Rust for Linux 的 v7 补丁中,上一轮代码审查提出的各种意见得到了解决。还为更多的 Rust 代码添加了 SPDX 许可证说明、对 KUnit 的 UML x86_64 支持、文档更新和额外的 review-by/acked-by 标签。

这个补丁系列似乎正在稳定下来,因此可能不久我们会看到它被合入主线或至少进入 staging 子目录。在可预见的未来,为 Linux 内核构建采用 Rust 语言开发的组件仍然是作为一种可选项存在。

另外,23 日还发布了 Uutils 0.0.14,作为 GNU Coreutils 的 Rust 版本替代品。这个新版本修复了 Android 支持,并对包含的命令(如 mv / chown / df / cp / mkdir / stat 和其他常见的 Coreutils 实用程序)进行了许多修复和兼容性改进。

更多介绍请阅读新闻出处,“Rust For The Linux Kernel Updated, Uutils As Rust Version Of Coreutils Updated Too”: https://www.phoronix.com/scan.php?page=news_item&px=Rust-Linux-v7-Plus-New-Uutils

关键词: Linux, Rust, Uutils

  • Linux 5.19 上图形驱动程序代码有大更新,新增代码近 50 万行

David Airlie this morning sent in the Direct Rendering Manager (DRM) subsystem updates for the Linux 5.19 merge window. Most notable with the DRM display/graphics driver updates for this next kernel version is a lot of work on Intel Arc Graphics DG2/Alchemist in getting that support ready plus initial Raptor Lake enablement. as well as AMD preparing for next-generation CDNA Instinct products and RDNA3 Radeon RX 7000 series graphics cards.

David Airlie 近日为 Linux 5.19 合并窗口提交了 Direct Rendering Manager (DRM) 子系统更新。值得注意的是下一个内核版本的 DRM 显示/图形驱动程序更新主要是有关 Intel Arc Graphics DG2/Alchemist 以及对 Raptor Lake 初步启用方面的大量工作。代码还包括 AMD 为下一代 CDNA Instinct 产品和 RDNA3 Radeon RX 7000 系列显卡所做的准备。

由于 Intel 和 AMD 为其最新的图形产品完成了所有工作,所以相关改动非常大,PR 修改了 1302 个文件,495,793 行新代码和 32,019 行删除代码。由于自动生成的头文件和其他与为 RDNA3 提供新 IP 块相关的头文件,所以大多数新增代码都和 AMD 图形驱动程序有关。正是这种改动导致现在 AMD 图形驱动程序在 Linux 内核中有超过 400 万行代码。

Intel 图形驱动程序为各种 “motherboard down” DG2 笔记本电脑 GPU 添加了 PCI ID,初始 Raptor Lake P 支持,初始 Raptor Lake S 支持,计算引擎 ABI 现在为 DG2 公开,以及各种其他 DG2 功能,Arctic Sound M 平台添加了信息、对 Haswell 和更新版本的 DisplayPort HDR 支持、小型 PCI BAR 启用以及各种其他更改。DG2/Alchemist 仍然是 Intel 驱动程序开发人员的开源的代码重点,而最近更多的 Ponte Vecchio 代码也已经出来。

在 AMD Radeon 图形方面,启用了各种新的 IP 块,例如 SMU 13.x、SOC21 等。仍然需要做更多的工作,但下一代 CDNA 和 RDNA3 显卡的准备工作都在进行中,预计将在今年晚些时候推出。作为他们新的开源驱动程序启用方法的一部分,这种启用将逐块出现。

其他一些工作包括添加 eDP 支持的 Qualcomm MSM DRM 驱动程序、对 QXL 驱动程序的 AArch64 支持、Sun4i 驱动程序中的 Allwinner D1 支持、ASpeed AST 驱动程序中的 DisplayPort 支持、MediaTek MT8186 支持、Rockchip VOP2 支持以及对较小驱动程序的更改.

更多介绍请阅读新闻出处,“Nearly Half A Million Lines Of New Graphics Driver Code Sent In For Linux 5.19”: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.19-DRM-Driver-Updates

关键词: Linux, DRM,Intel,AMD

  • Linux 5.19 对 Printk 的改进

The Linux kernel’s printk() function for printing messages to the kernel log continues to be improved upon in 2022.

printk() 是 Linux 内核中用于将消息打印到内核日志的函数。在过去的几年里,人们一直在努力通过各种方法来改进它,以使这个广泛使用的内核功能更加健壮和可靠。这项工作 2022 年继续得到改进,最新成果是目前可以让控制台更加快速地运行,方法是为每个注册的控制台专门为打印创建一个 KThreads 线程。据了解这个改进会被合入 Linux 5.19 中。

来自 SUSE 的 Petr Mladek 对这项改进的解释如下:

Offload writing printk() messages on consoles to per-console kthreads.

It prevents soft-lockups when an extensive amount of messages is printed. It was observed, for example, during boot of large systems with a lot of peripherals like disks or network interfaces.

It prevents live-lockups that were observed, for example, when messages about allocation failures were reported and a CPU handled consoles instead of reclaiming the memory. It was hard to solve even with rate limiting because it would need to take into account the amount of messages and the speed of all consoles.

It is a must to have for real time. Otherwise, any printk() might break latency guarantees.

The per-console kthreads allow to handle each console on its own speed. Slow consoles do not longer slow down faster ones. And printk() does not longer unpredictably slows down various code paths.

There are situations when the kthreads are either not available or not reliable, for example, early boot, suspend, or panic. In these situations, printk() uses the legacy mode and tries to handle consoles immediately.

更多介绍请阅读新闻出处,“Linux 5.19’s Printk To Offload Messages To Per-Console KThreads”: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.19-Printk

关键词: Linux, Printk

联系我们

欢迎扫描二维码加微信联系我们:

tinylab wechat



Read Album:

Read Related:

Read Latest: