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

泰晓RISC-V实验箱,转战RISC-V,开箱即用
请稍侯

泰晓资讯·3 月 / 第三期 / 2024

unicornx 创作于 2024/03/21

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

Linux 内核最新消息

这两周依然是 6.9 的 Merge Window 期,如果不出意外,这个周日(24 日)我们将看到 v6.9-rc1 的发布。

https://www.kernel.org/ updated by 2024/3/21

分支类型版本发布时间
mainline6.82024-03-10
stable6.8.12024-03-15
stable6.7.102024-03-15
longterm6.6.222024-03-15
longterm6.1.822024-03-15
longterm5.15.1522024-03-15
longterm5.10.2132024-03-15
longterm5.4.2722024-03-15
longterm4.19.3102024-03-15
linux-nextnext-202403202024-03-20

关键词: Linux

Linux 6.9 中即将推出不区分大小写的文件处理功能

The optional case-insensitive file/folder handling under Linux that’s hooked up for various file-systems like EXT4 and F2FS will benefit from improved performance on the upcoming Linux 6.9 kernel cycle.

Linux 6.9 中的一项改进是实现了针对各种文件系统(如 EXT4 和 F2FS),实现了不区分大小写的文件和文件夹处理,这项功能目前是可选的。

来自 Microsoft 的工程师 Christian Brauner 在 Linux 6.9 合并窗口打开之前提交了针对 VFS 的各种修改,其中最有趣的改动是增强了不区分大小写的处理代码。Christian 解释说:

“Finally merge the case-insensitive improvement series Gabriel has been working on for a long time. This cleanly propagates case insensitive operations through s_d_op which in turn allows us to remove the quite ugly generic_set_encrypted_ci_d_ops() operations. It also improves performance by trying a case-sensitive comparison first and then fallback to case-insensitive lookup if that fails. This also fixes a bug where overlayfs would be able to be mounted over a case insensitive directory which would lead to all sort of odd behaviors.”

新闻出处,“Improved Case-Insensitive File Handling Coming To Linux 6.9”: https://www.phoronix.com/news/Linux-6.9-Case-Insensitive

关键词: Linux, VFS

Linux 6.9 将删除旧的 NTFS 文件系统驱动程序

Merged two years ago with Linux 5.15 with the “NTFS3” driver developed by Paragon Software with working read-write support and other improvements for supporting Microsoft’s NTFS file-system driver. This driver was a big improvement over the original NTFS read-only driver found in the mainline kernel and faster than using the NTFS-3G FUSE file-system driver. Now with enough time having passed and the NTFS3 driver working out well, the older NTFS driver is set for removal.

两年前随 Linux 5.15 合入内核主线的 “NTFS3” 驱动程序,可以有效地支持 Microsoft 的 NTFS 文件系统,并支持对文件的读和写。此驱动程序比主线内核中原先的 NTFS 驱动程序(只支持读)有了很大的改进,并且比使用 NTFS-3G FUSE 文件系统驱动程序更快。经过了足够长的时间考验,NTFS3 驱动程序运行良好,因此社区决定删除较旧的 NTFS 驱动程序。

在 Linux 6.9 合并窗口开放之前,Christian Brauner 提交了一个名为 “vfs ntfs” 的 PR,该请求将删除旧的 NTFS 驱动程序。

“This removes the old ntfs driver. The new ntfs3 driver is a full replacement that was merged over two years ago. We’ve went through various userspace and either they use ntfs3 or they use the fuse version of ntfs and thus build neither ntfs nor ntfs3. I think that’s a clear sign that we should risk removing the legacy ntfs driver. … It’s unmaintained apart from various odd fixes as well. Worst case we have to reintroduce it if someone really has a valid dependency on it. But it’s worth trying to see whether we can remove it.”

删除旧的 NTFS 内核驱动程序可使 Linux 源代码减少 29,303 行。

新闻出处,“Linux 6.9 Set To Drop The Old NTFS File-System Driver”: https://www.phoronix.com/news/Linux-6.9-Dropping-Old-NTFS

关键词: Linux, NTFS

Linux 6.9 对 CPU 定时器进行了重大修改

The Linux 6.9 kernel has a big rework to the CPU timer code that has been years in the making and has some power and performance benefits.

Linux 6.9 内核对 CPU 定时器代码进行了重大修改,该项工作已经持续了多年,在功能上和性能上都有所改进。

Thomas Gleixner 在 Linux 6.9 合并窗口期间针对 timers 的核心代码提交了 PR。他在提交中对本次修改做了很好的总结,这里直接原文摘录如下,不再翻译了:

The hierarchical timer pull model

When timer wheel timers are armed they are placed into the timer wheel of a CPU which is likely to be busy at the time of expiry. This is done to avoid wakeups on potentially idle CPUs.

This is wrong in several aspects:

1) The heuristics to select the target CPU are wrong by definition as the chance to get the prediction right is close to zero.

2) Due to #1 it is possible that timers are accumulated on a single target CPU

3) The required computation in the enqueue path is just overhead for dubious value especially under the consideration that the vast majority of timer wheel timers are either canceled or rearmed before they expire.

The timer pull model avoids the above by removing the target computation on enqueue and queueing timers always on the CPU on which they get armed.

This is achieved by having separate wheels for CPU pinned timers and global timers which do not care about where they expire.

As long as a CPU is busy it handles both the pinned and the global timers which are queued on the CPU local timer wheels.

When a CPU goes idle it evaluates its own timer wheels:

  • If the first expiring timer is a pinned timer, then the global timers can be ignored as the CPU will wake up before they expire.

  • If the first expiring timer is a global timer, then the expiry time is propagated into the timer pull hierarchy and the CPU makes sure to wake up for the first pinned timer.

The timer pull hierarchy organizes CPUs in groups of eight at the lowest level and at the next levels groups of eight groups up to the point where no further aggregation of groups is required, i.e. the number of levels is log8(NR_CPUS). The magic number of eight has been established by experimention, but can be adjusted if needed.

In each group one busy CPU acts as the migrator. It’s only one CPU to avoid lock contention on remote timer wheels.

The migrator CPU checks in its own timer wheel handling whether there are other CPUs in the group which have gone idle and have global timers to expire. If there are global timers to expire, the migrator locks the remote CPU timer wheel and handles the expiry.

Depending on the group level in the hierarchy this handling can require to walk the hierarchy downwards to the CPU level.

Special care is taken when the last CPU goes idle. At this point the CPU is the systemwide migrator at the top of the hierarchy and it therefore cannot delegate to the hierarchy. It needs to arm its own timer device to expire either at the first expiring timer in the hierarchy or at the first CPU local timer, which ever expires first.

This completely removes the overhead from the enqueue path, which is e.g. for networking a true hotpath and trades it for a slightly more complex idle path.

Gleixner 解释了这项巨大努力的好处。据他介绍这项工作已经开发了好几年,已经经过来自多个芯片供应商团队的广泛测试,并通过了广泛的集成测试。在那些关注网络吞吐的工作负载上观察到了轻微的性能改进,来自 Intel 的团队证实,这使他们能够在大部分空闲情况下首次完全关闭多芯片插槽上的芯片。目前已知的一个比较突出的导致性能下降的案例是发生在一个特定场景下的 netperf 测试中,有大约 1.5% 的性能损失,但其余的性能测试结果都是偏向提高或者保持不变,在电源管理方面的表现也是积极的。

让我们拭目以待,看看将来启动 Linux 6.9 基准测试后,在性能和功耗上的整体情况变化如何。

新闻出处,“Linux 6.9 Has A Big Rework To CPU Timers - Some Power/Performance Benefits”: https://www.phoronix.com/news/Linux-6.9-Timers-Rework

关键词: Linux, Timer

LLVM/Clang 已经可以作为 Linux 发行版的 GCC 替代品

While the performance of LLVM/Clang is on-par with GCC these days on both x86_64 and AArch64 and the C/C++ support is very robust compared to many years ago, most Linux distributions continue using the GCC compiler and GNU toolchain by default. OpenMandriva is a well known Linux distribution that for several years has been a Clang-built Linux distribution while for three years now the Chimera Linux distribution has also been relying exclusively on an LLVM toolchain.

虽然 LLVM/Clang 的性能现在在 x86_64 和 AArch64 上与 GCC 已经不相上下,并且与多年前相比,其对 C/C++ 的支持已经变得非常强大,但大多数 Linux 发行版仍然默认继续使用 GCC 编译器和 GNU 工具链。作为特例,OpenMandriva,这个著名的 Linux 发行版,多年来一直采用 Clang 构建其发行版;此外,三年来,Chimera Linux 这个发行版也一直完全依赖 LLVM 工具链。

Daniel Kolesa 在 FOSDEM 2024 上介绍了 Chimera Linux 项目如何使用 LLVM 构建 Linux 发行版。Chimera Linux一直只使用基于 LLVM 的工具链,这包括 Clang C / C++编译器以及 compiler-rt 和 libc++ 以及其他 LLVM 的子项目。

Chimera Linux 已经成功地使用这个 LLVM 工具链支持了五个 CPU 架构,而 LLVM 已经证明自己有能力承担这项工作。虽然并非没有障碍,但这项工作已经证明 LLVM 可以成功地用作构建 Linux 发行版的工具链。

Chimera Linux 发现在链接时间优化(LTO)上 LLVM/Clang 支持更好,此外在编译器的安全强化上 LLVM/Clang 也表象良好,工具链的补丁修复基本和 GCC 保持同步。

那些想了解更多关于 Daniel Kolesa 使用 LLVM 工具链编译完整 Linux 发行版的经验的人可以通过 https://fosdem.org/2024/schedule/event/fosdem-2024-2555-building-a-linux-distro-with-llvm/ 找到他的 FOSDEM 2024 演示资料。那些想要了解 Chimera Linux 发行版本身的人可以访问 https://chimera-linux.org/

新闻出处,“LLVM/Clang Can Work Fine As A GCC Replacement For Linux Distributions”: https://www.phoronix.com/news/LLVM-Clang-Chimera-Linux-2024

关键词: LLVM, Clang, GCC, Linux

Mold Linker 从 v2.4.1 直接升级到 v2.30

Mold 2.30 is out this weekend as the newest version of this open-source high speed linker alternative to GNU Gold/LD and LLVM LLD.

Mold 2.30 于本周末发布。如果你一直在密切关注该项目的话,可能会对这个新版本的版本号感到有点惊讶,因为上一个版本还是 2.4,而这次版本号直接跳到 2.30。

Mold 首席开发人员 Rui Ueyama 在 v2.30 发布公告中解释说这是为了增强对 GNU libtool 的兼容性。按照 Rui 的说法,这次发布其实仅包含一些小错误的修复,但版本号却从 2.4.1 增加到 2.30.0,其主要目的是为了防止 GNU libtool 将 mold 2.4.1 误认为是 GNU ld 2.4.1,而这可能会导致 GNU libtool 将 Mold 识别为 GNU ld 的过时版本。提高版本号以与 GNU ld 保持一致可能不是最优雅的解决方案,但它却是解决 GNU libtool 兼容性问题的最实用的方案。

新闻出处,“Mold Linker Jumps From v2.4.1 To v2.30 To Resolve GNU libtool Compatibility”: https://www.phoronix.com/news/Mold-Linker-2.30-Released

关键词: Mold

OpenJDK Java 22 正式发布

Oracle has announced the general availability of OpenJDK Java 22.

Oracle 宣布正式推出 OpenJDK Java 22。

Java 22 提供了 Foreign Function and Memory API 以及 Unnamed Variables and Patterns API 的最终版本。此外,Java 22 中新增加的功能还包括:

  • 为 G1 垃圾回收器带来了 region pinning
  • 还处于 preview 阶段的 “statements before super(…)”
  • preview 阶段的 class-file API
  • support to launch multi-file source code programs
  • Java Vector API 的最新工作
  • preview 的 Stream gatherers
  • 结构化并发编程的第二个 preview版
  • 以及各种其他新增功能。

有关 Java 22 正式版的更多详细信息,请参阅本周二上午的发布公告 (https://mail.openjdk.org/pipermail/jdk-dev/2024-March/008827.html)。OpenJDK Java 22 可从 https://jdk.java.net/22/ 下载。

新闻出处,“OpenJDK Java 22 Rolls Into GA With New Features”: https://www.phoronix.com/news/OpenJDK-Java-22-Released

关键词: OpenJDK

Musl libc 1.2.5 发布

Musl libc 1.2.5 released on Thursday as the newest version of this lightweight, speedy, and free software C library implementation that is popular for embedded use, containers, and elsewhere.

Musl libc 1.2.5 于本月初发布,这个轻量级、快速和免费的 C 库实现,在嵌入式使用、容器和其他地方很受欢迎。

在 musl libc 1.2.5 中,新增加了 statx 和 preadv2/pwritev2,从而确保其可兼容较旧的 Linux 内核。此外,还增加对两个新架构的支持:它们是 64 位的 loongarch64 和 32 位架构的 riscv32。

Musl libc 1.2.5 还对 printf 函数进行了更改,以符合更新的标准,此外还包括对 RISC-V 64 位的 TLSDESC 支持,以及许多错误修复。在问题修复方面,RISC-V 修复了许多错误,包括 RISC-V 64 位上的指令缓存刷新等。

有关 musl libc 1.2.5 的更多详细信息,请参阅发布公告(https://www.openwall.com/lists/musl/2024/03/01/2)。这个开源 C 库可以从 https://musl.libc.org/ 下载。

新闻出处,“Musl libc 1.2.5 Released With RISC-V 32-bit & LoongArch 64-bit Ports”: https://www.phoronix.com/news/musl-libc-1.2.5

关键词: Musl

Intel 推出 Core i9 14900KS,主频高达 6.2GHz

Intel today is introducing the Core i9 14900KS as their newest “world’s fastest desktop processor” with up to 6.2GHz clock frequencies.

Intel 上周四推出 Core i9 14900KS, 该款号称为其最新的 “世界上最快的台式机处理器”,时钟频率高达 6.2GHz。

Intel Core i9 14900KS 是一款 24 核处理器,与 i9-14900K 一样,具有 8 个 P 核和 16 个 E 核,而这款特别版处理器的最高频率为 6.2GHz。14900KS 的规格与 14900K 相同,只是时钟速度不同。14900KS 的 Thermal Velocity Boost 频率为 6.2GHz,而 14900K 为 6.0GHz,Turbo Boost Max Tech 3.0 频率为 5.9GHz,而 14900K 是 5.8GHz,E-core Max Turbo 频率为 4.5GHz,而 14900K 是 4.4GHz。

i9-14900KS 归属于新的高端 Raptor Lake Refresh 台式机 CPU 家族。Core i9 14900KS 的售价为 689 美元,比 Core i9 14900K 高出 100 美元。

Intel 也提到了针对该款处理器的应用程序优化软件,但该软件仅在 Windows 下受支持。Intel 展示了各种 Windows 游戏基准测试,以显示 Core i9 14900KS 能够胜过 AMD 的 Ryzen 9 7950X3D …… 不过这看上去与 Linux 游戏玩家和爱好者没有多大关系。

新闻出处,“Intel Launches Core i9 14900KS, Clocking Up To 6.2GHz”: https://www.phoronix.com/news/Intel-Core-i9-14900KS

关键词: Intel

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: