As of this writing, 5,546 non-merge changesets have been pulled into the mainline kernel repository for the 6.16 release. This is a bit less than half of the total commits for 6.15, so the merge window is well on its way. Read on for our summary of the first half of the 6.16 merge window.
截至目前,Linux 6.16 的主线内核代码库已经合并了 5,546 个非合并(non-merge)变更集。这一数字略低于 6.15 全部提交的一半,因此本次合并窗口已进入中段。下面是我们对 6.16 合并窗口前半部分的总结。
As always, the LWN kernel source database provides summary statistics and historical breakdowns for subscribers. Here are the most interesting commits of the 6.16 merge window so far:
一如既往,LWN 的内核源代码数据库为订阅用户提供统计摘要和历史细分数据。以下是 6.16 合并窗口中目前最有趣的一些提交:
Architecture-specific
架构相关
Five-level page-table support is now unconditionally enabled for x86_64. “Both Intel and AMD CPUs support 5-level paging, which is expected to become more widely adopted in the future. All major x86 Linux distributions have the feature enabled.”
x86_64 现已无条件启用五级页表支持。“Intel 和 AMD 的 CPU 都支持五级分页,这一功能未来预计会被更广泛地采用。所有主流 x86 Linux 发行版均已启用该功能。”
PowerPC now supports dynamic preemption (i.e., changing the kernel's preemption settings at boot time).
PowerPC 现已支持动态抢占(即可以在启动时更改内核的抢占设置)。
The intel_pstate driver now registers an energy model for use with energy-aware scheduling on hybrid platforms without symmetric multithreading (also known as hyperthreading).
intel_pstate 驱动现在注册了一个能耗模型,可用于在不启用对称多线程(也称为超线程)的异构平台上进行能耗感知调度。
Users can now control C1 demotion (the process whereby a CPU can independently decide to remain in a higher power state when the kernel tries to enter a lower one) with a sysfs knob, and retrieve information on the capacity of different CPUs.
用户现在可以通过 sysfs 接口控制 C1 降级(即在内核试图将 CPU 置于较低功耗状态时,CPU 可自主决定是否保持在较高功耗状态),并可获取不同 CPU 的性能容量信息。
Arm64 lazy-preemption support and scalable-matrix-extension support have both been merged.
Arm64 的延迟抢占支持(lazy-preemption)和可扩展矩阵扩展(scalable matrix extension)已合入主线。
Core kernel
内核核心
The kernel will now hand out pidfds for processes that have already exited when a SO_PEERPIDFD socket is used to request a pidfd for a thread group leader that has already been reaped. Since user-space code needs to handle processes dying while it holds a pidfd anyway, this should simplify error handling.
当使用 SO_PEERPIDFD 套接字请求已被回收的线程组主进程的 pidfd 时,内核现在也会返回 pidfd。由于用户空间代码本来就必须处理持有 pidfd 期间进程可能已死亡的情况,这一改动有助于简化错误处理逻辑。
Core dumps can now be sent to an existing Unix socket, instead of being written to a file or spawning a user-mode helper. Christian Brauner hopes that this will reduce the number of CVEs related to the user-space core-dumping API.
核心转储现在可以发送到一个已存在的 Unix 套接字,而不再局限于写入文件或启动用户态帮助程序。Christian Brauner 希望此举能减少与用户空间核心转储 API 相关的 CVE 漏洞数量。
io_uring can now be used to create pipes.
io_uring 现在可以用于创建管道(pipe)。
Futexes are now NUMA and mempolicy aware. This gives greater control over where futexes are placed in memory, so that they can be located close to the processes that will use them.
Futex(快速用户空间互斥体)现在支持 NUMA 和内存策略感知,允许更精确地控制其在内存中的放置位置,使其更靠近需要使用它的进程。
There is now a command-line option for enabling or disabling group scheduling of realtime tasks.
现在可以通过命令行选项启用或禁用实时任务的组调度(group scheduling)。
Filesystems and block I/O
文件系统与块 I/O
The bfs and omfs filesystems now use the new mount API. The API, added in 2019, has slowly been adopted by the kernel's many filesystems.
bfs 和 omfs 文件系统现已改用新挂载 API。该 API 自 2019 年引入以来,正逐步被内核中多个文件系统采用。
A new sysctl knob, vfs_cache_pressure_denom, indirectly controls the number of dentry cache entries ('dentries') that are preserved while the system is experiencing memory pressure. Specifically, the minimum proportion of dentries reclaimed during a memory reclamation event is 1/vfs_cache_pressure_denom, so setting a higher value will reduce the number of cache entries that are guaranteed to be collected, leaving more cache entries to be evicted or retained on their merits.
一个新的 sysctl 控制项 vfs_cache_pressure_denom
被引入,用于间接控制在系统遭遇内存压力时保留多少 dentry 缓存项。具体来说,在一次内存回收事件中,最少会回收 1/vfs_cache_pressure_denom 的 dentry,因此将该值设得更高可以减少必须被回收的缓存数量,允许系统根据使用情况决定哪些缓存保留或回收。
Zoned loop block devices, which emulate a generic block device using multiple files on an existing file system, are now available and documented.
分区环回块设备(zoned loop block devices)现已可用并具备文档支持,它使用多个文件在已有文件系统上模拟出通用块设备。
Among many bcachefs changes, the filesystem now supports only performing rebalance operations when the system has AC power.
在众多 bcachefs 的更改中,文件系统现在支持仅在系统连接交流电源时执行重平衡(rebalance)操作。
XFS supports atomic writes. LWN recently covered discussions about support for atomic writes in more filesystems.
XFS 文件系统现在支持原子写入。LWN 最近也报道了在更多文件系统中增加原子写支持的讨论。
EROFS can now make use of Intel QAT hardware acceleration.
EROFS 现在可以利用 Intel 的 QAT 硬件加速功能。
“Stupendous” performance improvements on ext4 from a number of optimizations.
由于多项优化,ext4 获得了“惊人”的性能提升。
The ancient uselib() system call, which has been deprecated for some time, has now been removed, hopefully without breaking any user-space applications in the process. The system call is used to map dynamic libraries with writing disabled, so that they can be shared between different programs. That use case is served today by calling mmap() with appropriate flags.
已废弃多时的 uselib()
系统调用现已被移除,开发者希望此举不会破坏任何用户空间程序。该调用原用于以禁止写入的方式映射动态库,从而供多个程序共享,如今这一功能可通过 mmap()
搭配适当标志实现。
The block-layer maintainers have finally eliminated bounce buffering; see this article for details.
块层维护者终于彻底移除了 bounce 缓冲机制;详见相关文章。
Hardware support
硬件支持
Clock: System Timer Modules on S32G NXP SoCs, EcoNet HPT timers, and Analog ADP5055 digital to analog converters.
时钟:支持 NXP S32G SoC 的系统定时器模块、EcoNet 的 HPT 定时器、以及 Analog 的 ADP5055 数模转换器。
GPIO and pin control: EcoNet EN751221 SoCs, SG2044 SoCs, loongson, mc33xs2410 high-side switches, rzg2l-gpt pulse-width-modulation controllers, max77759 companion PMICs, VeriSilicon BLZP1600 GPIO interfaces, and Spacemit K1 SoCs.
GPIO 和引脚控制:支持 EcoNet EN751221 和 SG2044 SoC、Loongson、mc33xs2410 高边开关、rzg2l-gpt PWM 控制器、max77759 电源管理芯片、VeriSilicon BLZP1600 GPIO 接口,以及 Spacemit K1 SoC。
Hardware monitoring: PTC support on int340x, Airoha EN7581s, and IPQ5018 SoCs.
硬件监控:支持 int340x 上的 PTC、Airoha EN7581 以及 IPQ5018 SoC。
Input: AMD HID2, Renesas RZ/G3Es, Rockchip RK3528s, and Samsung Exynos Autov920 processors.
输入设备:支持 AMD HID2、Renesas RZ/G3E、瑞芯微 RK3528 和三星 Exynos Autov920 处理器。
Media: MT8192 Spherion and MT8186 Corsola SoCs.
多媒体支持:联发科 MT8192(Spherion)和 MT8186(Corsola)SoC。
Miscellaneous: SDHCI OF on the SpacemiT K1 SoCs.
其他支持:SpacemiT K1 SoC 上的 SDHCI OF。
Networking: Qualcomm IPQ5018 WiFi chipsets.
网络支持:高通 IPQ5018 WiFi 芯片组。
Power: Pegatron Chagall batteries, Maxim MAX8971 battery chargers, Huawei Matebook E Go chargers, Dimensity 1200 MT6893s, SM4450 power domains, RK3562 SoCs, Allwinner H6/H616 PRCM PPUs, and TI TPS65214 integrated power management chips.
电源管理:支持 Pegatron Chagall 电池、Maxim MAX8971 充电芯片、华为 Matebook E Go 充电器、天玑 1200 MT6893、SM4450 电源域、RK3562 SoC、全志 H6/H616 PRCM PPU 及 TI TPS65214 电源管理芯片。
Sound: AMD ACP 7.x, Cirrus Logic CS35L63 amps and CS48L32 audio processors, Everest Semiconductor ES8375s and ES8389s, Longsoon-1 AC'97 audio codecs, NVIDIA Tegra264 SoCs, Richtek ALC203 and RT9123 codecs, Rockchip SAI controllers, Intel WCL, and DJM-V10 mixers.
音频支持:支持 AMD ACP 7.x、Cirrus Logic 的 CS35L63 放大器和 CS48L32 音频处理器、Everest Semiconductor 的 ES8375 与 ES8389、龙芯一号 AC'97 编解码器、NVIDIA Tegra264 SoC、Richtek 的 ALC203 与 RT9123 编解码器、瑞芯微 SAI 控制器、Intel WCL 以及 DJM-V10 混音器。
Miscellaneous
其他杂项
Filesystems and EFI variables can now be frozen (and later unfrozen) on a best-effort basis during suspend and hibernate operations.
在挂起与休眠操作过程中,现在可以尽力冻结(freeze)文件系统与 EFI 变量,并在之后恢复(unfreeze)。
Virtualization and containers
虚拟化与容器
Control group shared tracking for recursive statistics turned out not to scale well to large numbers of control groups and has been removed.
递归统计的控制组共享追踪功能在面对大量控制组时扩展性不佳,现已被移除。
Virtual machines (VMs) can now communicate with a TPM device emulated by a Secure VM Service Module.
虚拟机(VM)现在可以与由安全虚拟机服务模块(Secure VM Service Module)模拟的 TPM 设备通信。
Internal kernel changes
内核内部改动
The timer API has undergone some significant renaming. Functions with irregular names have been converted to use the timer_ prefix. For example, init_timer_key() is now timer_init_key(). There is another large refactoring expected near the end of the merge window.
定时器 API 进行了大幅重命名,许多不规范的函数名称统一采用 timer_
前缀。例如,init_timer_key()
现已改为 timer_init_key()
。合并窗口末期预计还将进行一轮大的重构。
Rust modules can now use configfs.
Rust 模块现在可以使用 configfs。
Stub drivers for the nova DRM driver continue to make their way upstream.
nova DRM 驱动的桩模块仍在持续提交至主线。
The virtual filesystem (VFS) interface has been cleaned up to reduce the proliferation of confusing names.
虚拟文件系统(VFS)接口进行了清理,减少混乱的命名。
The writepage() method has been completely removed from struct address_space_operations, along with its remaining uses.
struct address_space_operations
中的 writepage()
方法及其残余使用现已被完全移除。
The resctrl filesystem interface has now been moved to its own directory, as the next step toward letting it be used on multiple architectures.
resctrl 文件系统接口已移至独立目录,这是其向多架构支持迈出的下一步。
The kernel-doc script, the origins of which predate the Git era, is used to extract documentation from the kernel source during the documentation-build process. Prior to 6.16, it was a horrifying Perl script full of impenetrable regular expressions. That script has been replaced with a Python version that is better integrated into the Sphinx build system. The regular expressions are no more penetrable than before, but the script as a whole will be far more maintainable.
kernel-doc 脚本用于在构建文档时从内核源代码中提取文档,其历史可以追溯到 Git 之前的年代。6.16 之前,这一脚本是一个布满晦涩正则表达式的恐怖 Perl 脚本。现在,它已被一个更易维护、并与 Sphinx 构建系统集成得更好的 Python 脚本所取代。虽然正则表达式本身依旧难懂,但整个脚本的可维护性大大提高。
The kernel's build scripts had a separate option to handle specifying compiler flags that disable warnings, due to some inflexibility in the option-parsing code. The cc-disable-warning option is no longer required; it can be replaced by the normal cc-option.
内核构建脚本中曾有一个单独的选项 cc-disable-warning
用于指定禁用编译器警告的标志,这是由于选项解析代码的不灵活所致。现在这一选项已不再需要,可以使用常规的 cc-option
替代。
There is a new DMA mapping API, intended to provide an alternative to scatterlists. While it has taken some time to be finalized, the new API should provide better performance for some high-bandwidth DMA devices.
新的 DMA 映射 API 被引入,作为 scatterlist 的替代方案。虽然这一 API 最终确定花费了一些时间,但对于某些高带宽 DMA 设备,它应能带来更好的性能。
The idle-CPU-selection logic for sched_ext can now apply topology-based optimizations in more cases, including to tasks with CPU affinities.
sched_ext 的空闲 CPU 选择逻辑现在可以在更多场景下应用基于拓扑的优化,包括处理具有 CPU 亲和性(affinity)的任务。
There are 5,379 non-merge commits currently waiting in linux-next, so there are certainly more new kernel features to come. The merge window is expected to close on June 8. As usual, we will post another summary of those once the merge window closes.
目前,linux-next 中还有 5,379 个非合并提交等待进入主线,因此仍有更多内核新特性尚未合入。本次合并窗口预计将于 6 月 8 日关闭。届时,我们将照例发布另一篇总结文章。
暂无评论内容