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

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

泰晓资讯·7 月 / 第二期 / 2023

unicornx 创作于 2023/07/21

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

Linux 内核最新消息

https://lkml.org/lkml/2023/7/16/260

Linux 6.5 的第二个测试版本 RC2 发布了。Linux 6.5-rc2 的新功能包括新增了一些 AMD PMF 的 paltform driver,貌似是为了支持 Zen 5( family 26)。Linux 6.5-rc2 还用 C 重写了一些汇编代码,以处理最近内核版本中的一些 Control Flow Integrity (kCFI) 和 FineIBT (Indirect Branch Tracking) 代码中的缺陷。

Linus Torvalds 在他的官方发布公告中原话是这么说的:

“No surprises here: this thing looks very normal. The patch stats are about 60% drivers, with networking and gpu drivers being the bulk of it, but there’s a little bit of everything in there: nvme, pin control, x86 platform drivers, HID, etc etc.

Ignoring drivers, it’s a mixed set of fixes all over: architectures (x86, powerpc, RISC-V, xtensa), some core networking (mainly netfilter), core kernel (tracing, scheduler), filesystems (erofs, smb client), and documentation and selftests.”

Linux 6.5 的稳定版估计在 6 月底左右发布。请继续关注 “泰晓资讯” 以获取更多有关 Linux 内核的信息。

https://www.kernel.org/ updated by 2023/07/21

分支类型版本发布时间
mainline6.5-rc22023-07-16
stable6.4.42023-07-19
stable6.3.13 [EOL]2023-07-11
longterm6.1.392023-07-19
longterm5.15.1202023-07-05
longterm5.10.1862023-06-28
longterm5.4.2492023-06-28
longterm4.19.2882023-06-28
longterm4.14.3202023-06-28
linux-nextnext-202307202023-07-20

关键词: Linux

Linux 6.5 上有关 AArch6 的新特性

The ARM64 (AArch64) architecture code has seen some clean-ups and support for new Arm ISA features with the in-development Linux 6.5 kernel.

Linux 6.5 针对 ARM64(AArch64)架构的代码进行了一些清理,并新增了一些 ISA 相关的功能。

Armv8.9 引入了新的 Permission Indirection Extensions,并在 Linux 6.5 中启用了该功能。不过,当前的实现还只是一个初步版本,在未来的内核版本中还需要添加的内容包括:Guarded Control Stacks 和 Permissions Overlays。Permission Indirection Extensions 支持更有效地使用 Translation Table Descriptors 来设置权限并增加了新的权限类型。Permissions Overlays 允许在 EL0 上运行的进程逐步地限制权限,同时减少对在更高特权异常级别运行的进程的调用次数。Permissions Overlays 还可以避免昂贵的 TLB 操作。这些 Arm 扩展允许更好地管理内存页相关的权限。

Linux 6.5 中针对 64 位 Arm 的另一个新功能是针对 Armv8.8,在用于空间增加了对 memcpy 和 memset 的支持。

此外,ARM64 上还有针对 Arm PMU 的更新,对 Kernel Page Table Isolation(KPTI) 的代码清理以及其他维护更新。

更详细的修改列表,请阅读新闻出处,“Linux 6.5 On AArch64 Sees New Extensions, KPTI Cleanup”: https://www.phoronix.com/news/Linux-6.5-ARM64

关键词: Linux,ARM64

Linux 6.5 中加入并行启动 CPU 功能,可以缩短大型服务器上的启动或者重启的时间

The work originating in late 2021 for bringing up secondary CPU cores in parallel at boot-time to help shorten boot/reboot times for large core count servers has finally landed with the in-development Linux 6.5 kernel.

此项改进源自 2021 年底的工作,以帮助缩短大型多核心服务器的启动和重新启动时间,目前终于合入开发中的 Linux 6.5 内核。

这种并行启动 CPU 的能够缩短大型服务器的启动时间,特别是对于超大规模提供商和其他云提供商常用的 Kexec 重新启动方式,可以绕过通常耗时的 POST 过程从而达到缩短启动时间的效果。Linux 目前的启动时间已经相当快了,但这个补丁的加入对于最大化 VM 的 uptrime 可能更为重要,很高兴看到这项工作最终落地。

该代码目前在基于 x86 的平台上已经完全启用。新增了一个 cpuhp.parallel= 的内核启动参数,用它可以 enable/disable 并行启动。默认处理行为通过 CONFIG_HOTPLUG_PARALLEL= 进行配置。

新闻出处,“Parallel CPU Bringup Lands For Linux 6.5 To Shorten Boot/Reboot Time On Large Servers”: https://www.phoronix.com/news/Parallel-CPU-Bringup-Linux-6.5

关键词: Linux

Linus Torvalds 亲自为 Linux 6.5 提交性能优化补丁

“Some people relax with a nice drink by the pool, I relax by playing around with inline [Assembly code],” as a nice quote of the day as Linus Torvalds explained after he took on improving upon a performance optimization patch that was proposed for the ongoing Linux 6.5 merge window.

“有些人放松的方式是在游泳池边喝一杯,而我通过写内联汇编代码来放松” 这是 Linus Torvalds 在提交性能优化补丁后给出的解释。

该补丁可以提供很大的吞吐量提升并降低 csum_partial 调用的延迟,这是 Linux 内核中通常用于计算校验和的函数。csum_partial` 这个函数被很多地方使用,从文件系统到网络都会用它来计算校验和。使用这个补丁在某些情况下,延迟可能会改善 8~9%,吞吐量可能会提高约 30%。

负责合并 x86/misc 提交的 AMD Linux 工程师 Borislav Petkov 回复 Linus Torvalds 的消息说:”还有第三种人,他们在游泳池边放松,喝着饮料,同时 玩内联汇编。-P”。

新闻出处,“Linus Torvalds Takes On A Performance Patch: “I Relax By Playing With Inline Assembly””: https://www.phoronix.com/news/Linus-Torvalds-Relax-Inline-ASM

关键词: Linux, Linus

Linux 6.5 的 Crypto 子系统新改进介绍

Herbert Xu has submitted the crypto subsystem updates for the ongoing Linux 6.5 merge window with new hardware support and some crypto API enhancements.

Herbert Xu 为 Linux 6.5 提交了针对 Crypto 加密子系统的改动,其中包含新的硬件支持和一些针对加密 API 的增强。

Linux 内核的 Crypto 子系统改进中最值得注意的是增加了对一些新 AMD CCP 硬件的支持。尽管补丁没有详细说明 AMD 处理器将具有这种新的加密协处理器,只是指明它们是 PCI 设备。AMD CCP 本身只有一些小的变化。考虑到涉及的开发人员,这种新的 AMD CCP 硬件可能是针对最近或即将推出的 Ryzen 客户端处理器,而不是 EPYC 服务器。AMD 加密协处理器通常会负责各种加密算法、随机数生成 (RNG) 和 Zlib 压缩/解压缩,从而减轻 AMD CPU 的相关类似工作。

此外,Linux 6.5 的 Crypto 子系统针对 StarFive RISC-V SoC 新增了哈希和 HMAC 支持。此外,还实现了 RSA 算法支持。

最后,该子系统还新增了一个 API 接口,允许在 jitter 中收集 raw entropy 以进行调试和分析。其他更改主要是对加密 API 和支持的算法的修复等工作。

新闻出处,“Linux 6.5 Crypto Adds New AMD CCP Hardware, StarFive RISC-V Bits”: https://www.phoronix.com/news/Linux-6.5-Crypto

关键词: Linux, Crypto

阿里巴巴(Alibaba)关注 Linux CPU 调度程序更改,以更好地处理带有 SMT/HT 线程的 QEMU。

There is a phenomenon where running a multi-threaded workload inside a virtual machine (VM) with Simultaneously Multi-Threading (SMT / Intel Hyper Threading) that a sibling thread could find itself busy while the CPU core is idle. A new Linux CFS patch series aims to make the scheduler better adapt to the QEMU topology.

有一种现象是,在支持 Simultaneously Multi-Threading(SMT / Intel Hyper Threading)的虚拟机 (VM) 内运行多线程程序时,同级(sibling)线程可能会发现自己在 CPU 内核空闲时处于繁忙状态。而现在有一个新的 Linux CFS 补丁可以使调度程序更好地适应 QEMU 的拓扑。

这个补丁由来自阿里巴巴的一位工程师提交,他向 CFS 负载均衡模块发送了一个补丁系列,以调整 QEMU CPU 拓扑,确保同级线程不会比主线程更忙。

“Multithreading workloads in VM with Qemu may encounter an unexpected phenomenon: one hyperthread of a physical core is busy while its sibling is idle. … The main reason is that hyperthread index is consecutive in qemu native x86 CPU model which is different from the physical topology. As the current kernel scheduler implementation, hyperthread with an even ID number will be picked up in a much higher probability during load-balancing and load-deploying.

This RFC targets to solve the problem by adjusting CFS loadbalance policy:

  1. Explore CPU topology and adjust CFS loadbalance policy when we found machine with qemu native CPU topology.

  2. Export a procfs to control the traverse length when select idle cpu.”

该补丁系列是在不久前才发出的,目前遭到 Intel 工程师 Peter Zijlstra 的反对。我们需要再观察一下内核社区的讨论结果,或者最终这个问题会归咎于 QEMU 而不是内核的问题。

新闻出处,“Alibaba Eyes Linux CPU Scheduler Changes To Better Handle QEMU With SMT/HT Threads”: https://www.phoronix.com/news/Linux-Sched-QEMU-SMT-Better

关键词: Linux, CFS,Alibaba

GCC 14 增加了对 RISC-V 矢量加密扩展的支持

The GNU Compiler Collection 14 (GCC 14) will feature support for the new RISC-V processor ISA vector cryptographic extensions.

GNU Compiler Collection 14 (GCC 14) 将支持新的 RISC-V 处理器 ISA 矢量加密扩展。本月初合并的是几个月来一直在开发的代码,用于在 GCC 中实现各种 RISC-V 矢量加密扩展。现在启用的扩展包括:

  • Zvbb
  • Zvbc
  • Zvkg
  • Zvkned
  • Zvkhn[a,b]
  • Zvksed
  • Zvksh
  • Zvkn
  • Zvknc
  • Zvkng
  • Zvks
  • Zvksc
  • Zvksg
  • Zvkt

LLVM 14 在三月份已经支持了这些扩展,GCC 14 这次将迎头赶上。与往常一样,GCC 每年发布一次,所以 GCC 14 的 stable 版本预计将于 2024 年发布。有关这些扩展的更多详细信息,请访问 RISC-V Cryptography Extension GitHub 存储库:https://github.com/riscv/riscv-crypto

新闻出处,“GCC 14 Adds Support For RISC-V Vector Crypto Extensions”: https://www.phoronix.com/news/GCC-RISC-V-Vector-Crypto-Exts

关键词: GCC, RISC-V,Vector Crypto

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: