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

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

泰晓资讯·5 月 / 第三期 / 2023

unicornx 创作于 2023/05/25

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

Linux 内核最新消息

https://lkml.org/lkml/2023/5/21/226

Linus Torvalds 本周初发布了 Linux 6.4-rc3 内核,这个版本的变化看上去相当平静。Linux 6.4 进展相当不错,它带来了许多新功能和令人兴奋的改进。Linus Torvalds 在 rc3 的发布公告中是这么写的:

Here we are, another week gone by, and another rc released.

Nothing really huge stands out there. Roughly half the patch is drivers, with - as usual - networking and gpu being the bulk of it, but there’s various other driver fixes in there too (usb, sound, media, …).

The other half is the usual fairly random stuff: tooling, arch updates (arm, s390, x86), core networking, documentation, filesystems…

其中大约一半的补丁是驱动程序,像往常一样,网络和 GPU 占了其中的大部分,但也有各种其他驱动程序修复(USB,声音,多媒体等)。另一半是通常相当随机的东西,包括:工具,架构更新(arm,s390,x86),网络,文档,文件系统 ……

Linux 6.4 的稳定版预计在 6 月底左右发布。

https://www.kernel.org/ updated by 2023/05/25

分支类型版本发布时间
mainline6.4-rc32023-05-21
stable6.3.42023-05-24
stable6.2.16 [EOL]2023-05-17
longterm6.1.302023-05-24
longterm5.15.1132023-05-24
longterm5.10.1802023-05-17
longterm5.4.2432023-05-17
longterm4.19.2832023-05-17
longterm4.14.3152023-05-17
linux-nextnext-202305242023-05-24

关键词: Linux

Loongson(龙芯)开始向 Linux 提交 3A6000 系列 CPU 的补丁

While the Loongson 3A6000 processors have yet to be officially launched, rumors since last year put it on target for launching in the first half of this year and some claims that there is such performance uplift that these Chinese CPUs could rival AMD Zen 3 or Intel Tiger Lake levels of performance. Ahead of the 3A6000 series launch, Linux patches have begun appearing for these next-gen LoongArch processors.

虽然 Loongson 3A6000 处理器尚未正式推出,但自去年以来的传言是该产品预计定在今年上半年推出,一些人声称这款来自中国的 CPU 的性能提升可以与 AMD Zen 3 或 Intel Tiger Lake 的性能水平相媲美。在 3A6000 系列发布之前,Linux 中用于支持该下一代 LoongArch 处理器的补丁已经开始出现。

Loongson 3A5000 系列是这家中国公司目前已经发布的处理器,也是第一款基于 Loongson 自研的 LoongArch 架构处理器,LoongArch ISA 的设计部分基于 MIPS64 和 RISC-V。Loongson 3A6000 系列在 Linux 上运行良好,来自 Loongson 的工程师已经将支持 LoongArch 的内核补丁合入上游代码,并继续在更多的用户空间软件中启用针对 LoongArch 的支持。

最新的进展是我们看到有人提交了针对 Loongson 3A6000 系列的补丁。Loongson 工程师发布了这个补丁系列,增加了一个 hardware page table walker。该补丁指出,基于 LoongArch ISA 的 3A6000 系列处理器及更新版本具有 hardware page table walke(PTW),可以在硬件级别快速处理 TLBI/TLBL/TLBS/TLBM 异常。软件处理只需要走 slow-paths,即 page faults。

另外,还有一个新的补丁系列添加了 LoongArch DBAR with different hints。这些针对不同 memory barriers 的 hints 可以为 Loongson 3A6000 系列带来更大的性能提升。

随着 Loongson 工程师推出的这两个补丁系列,并明确提到了对 3A6000 系列支持,想必今年针对这款来自中国的下一代 LoongArch 架构的 CPU 将很快推出更多的 Linux 内核支持代码。

新闻出处,“Loongson Begins Posting Linux Patches For 3A6000 Series CPUs”: https://www.phoronix.com/news/Loongson-3A6000-Linux-Patches

关键词: Linux, Loongson,3A6000,LoongArch

Linux 正式弃用 SLAB 分配器

Following the recent removal of the SLOB allocator, SLAB is the latest on the chopping block. In order to push users to the SLUB allocator as the preferred solution, SLAB is now going through its deprecation and eventual removal process.

继最近移除 SLOB 分配器之后,SLAB 成为下一个需要清理的目标,这样以后在内核中人们将只有 SLUB 一个选择。

在最近的 LSF/MM 聚会上,大家对最终删除 SLAB 都表示赞同,因此本周来自 SUSE 的 Vlastimil Babka 提交了一个补丁以删除 SLAB 内存分配器。Vlastimil Babka 在补丁中的描述如下:

“As discussed at LSF/MM and with no objections raised there, deprecate the SLAB allocator. Rename the user-visible option so that users with CONFIG_SLAB=y get a new prompt with explanation during make oldconfig, while make olddefconfig will just switch to SLUB.

In all defconfigs with CONFIG_SLAB=y remove the line so those also switch to SLUB. Regressions due to the switch should be reported to linux-mm and slab maintainers.”

和删除 CONFIG_SLAB=y 的修改代码行超过 137 行,这是因为这个修改需要涉及不同 CPU 架构上的多个内核配置。

估计此弃改动会在 Linux 6.5 开发周期中被合入主线。

新闻出处,“Patch Posted For Formally Deprecating The SLAB Allocator”: https://www.phoronix.com/news/Linux-SLAB-Deprecated-Patch

关键词: Linux,SLAB

LLVM 的 libc 为 RISC-V 实现了更快的 memcpy

Being merged into LLVM’s libc library recently are an optimized memory copy function “memcpy” implementation for the RISC-V architecture.

最近一项针对 RISC-V 的 memcpy 优化实现被合并到 LLVM 的 libc 库中。

该项针对 RISC-V 的 memcpy 优化可以更好地处理因未对齐内存访问异常所导致的执行速度极慢的情况。理论上该方案也可以帮助 ARM32,但目前只针对 RISC-V 32 位和 64 位软件做了优化。

该优化又来自 Google 的 Guillaume Chatelet 提交,通过对这种新实现的基准测试显示,处理速度从 474 ns 下降到 126 ns,极端情况下,优化可以从 6033 ns 下降到 981 ns。

即使对 RISC-V 进行了如此大的 memcpy 加速,但相比于 GNU 的 Glibc 中针对 RISC-V 的 memcpy 实现仍然逊色不少。在某些情况下,RISC-V 上的 Glibc memcpy 性能可以达到使用 LLVM libc 的新优化实现的两倍。。

新闻出处,“LLVM’s libc Gets Much Faster memcpy For RISC-V”: https://www.phoronix.com/news/LLVM-libc-Faster-memcpy

关键词: LLVM, libc, RISC-V, memcpy

GNU Binutils 为 Intel FRED/LKGS 做准备

The GNU Assembler “Gas” as part of the GNU Binutils collection has landed support for Intel FRED and LKGS instructions.

作为 GNU Binutils 工具集的一部分,GNU 汇编器 “Gas” 已经加入了对 Intel FRED 和 LKGS 指令的支持。

Intel 的 Flexible Return and Event Delivery (FRED) 指令彻底改变了 privilege levels,即我们常说的 CPU ring 之间的转换方式。FRED 旨在降低权限级别之间的转换的延迟。LKGS 指令,作为 FRED 的一部分,但也可以独立于 FRED 使用,可用于以更灵活的方式管理 GS 段寄存器的状态。

Linux 内核已经开始为 FRED 和 LKGS 做准备,而现在 Binutils/Gas 作为 GNU 编译器工具链的一部分,已经开始为即将推出的 Intel 处理器增加对这些新指令支持。

目前对 LKGS 和 FRED 指令的支持已经合入 Binutils 的 Git 仓库。来自 Intel 的工程师 Jun Zhang 对汇编器进行了必要的更改。这些改动将作为 Binutils 2.41 版本的一部分于 8 月发布。这个即将发布的版本还含有对 AMX-COMPLEX 的支持和面向未来 Intel CPU 的其他新增功能。

新闻出处,“GNU Binutils Prepares For Intel FRED/LKGS”: https://www.phoronix.com/news/GNU-Binutils-Intel-FRED

关键词: GNU,Binutils,Intel,FRED/LKGS

Bootlin 推出的 Snagboot 可用于恢复嵌入式设备

The embedded Linux experts at Bootlin have released Snagboot as a new open-source project aiming to make it easy to recover and re-flash embedded platforms.

Bootlin 的嵌入式 Linux 专家发布了一个新的开源项目 Snagboot,该项目的目的是为了使得恢复和重新刷新(Recover & Reflash)嵌入式设备变得容易。

如果我们手头得嵌入式系统和设备启动不了(也就是我们平时说的 “成了砖头”),我们可以使用 Snagboot 取代目前通常由供应商特定的工具来(重新)刷新嵌入式系统。Snagboot 中包含了一款工具叫做 snagrecover 可以通过初始化外部 RAM,而不是那些 ROM 或者 SD 卡,并在 RAM 上运行引导加载程序,Snagboot 还提供了另一款工具 snagflash,可以通过 USB 与引导加载程序通信,基于 DFU,USB MassStorage 或者 Fastboot 等协议烧写系统映像。

Snagboot 目前适用于 SoC 的嵌入式平台,包括 STMicroelectronics 的 STM32MP1,Microchip SAMA5,NXP i.MX6/7/8,Texas Instruments 的 AM335x,Allwinner Sunxi 和 Texas Instruments 的 AM62x。

有关 Snagboot 开源版本的更多详细信息,请访问 Bootlin 博客 https://bootlin.com/blog/releasing-snagboot-a-cross-vendor-recovery-tool-for-embedded-platforms/。Snagboot 项目目前托管在 GitHub 上 https://github.com/bootlin/snagboot/

新闻出处,“Bootlin’s Snagboot Aims To Recover & Reflash Embedded Platforms”: https://www.phoronix.com/news/Bootlin-Snagboot

关键词: Bootlin, Snagboot

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: