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

泰晓RISC-V实验箱,不会吃灰,开箱即用
请稍侯

泰晓资讯·4 月 / 第一期 / 2022

unicornx 创作于 2022/03/31

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

  • Linux 内核最新消息

目前处于 5.18 合并窗口期,本期资讯将为大家介绍更多 5.18 中的新特性。

https://www.kernel.org/ updated by 2022/3/31

分支类型版本发布时间
mainline5.172022-03-20
stable5.17.12022-03-28
stable5.16.182022-03-28
longterm5.15.322022-03-28
longterm5.10.1092022-03-28
longterm5.4.1882022-03-28
longterm4.19.2372022-03-28
longterm4.14.2742022-03-28
longterm4.9.3092022-03-28
linux-nextnext-202203302022-03-30

关键词: Linux

  • Intel 继续为 Linux 5.18 准备 CXL

While Compute Express Link (CXL) is an open industry standard backed by many notable hardware vendors, Intel engineers as usual are leading the charge when it comes to the Linux kernel bring-up. Intel engineers continue working on the Linux support around this high speed CPU-to-device/memory interface built atop PCIe.

Intel 在为 Linux 内核加入新特性的工作上始终处于领先地位。Compute Express Link (CXL) 是一个被许多著名硬件供应商所支持的开放行业标准,该标准基于 PCIe 定义了 CPU 高速访问周边外设和内存的接口。Intel 工程师正持续地努力为 Linux 加入对该标准的支持。

按计划,Intel 针对 Linux 内核的 Compute Express Link 工作需要提前于支持 CXL 的下一代服务器硬件发布前完成。最新一批 CXL 改进已经在本周随 Linux 5.18 合并窗口合入内核主线。最新的 CXL 子系统补丁修改包括基于 CXL/PCIe switch topology 发现 CXL 设备以及支持热插拔。此外,补丁还添加了支持动态 CXL 内存区域配置的处理。除了代码修改,补丁中还包括介绍 CXL 概念的新文档(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/driver-api/cxl/memory-devices.rst?id=b9132c32e01976686efa26252cc246944a0d2cab)。

更多描述请参考原文新闻出处,“Intel Continues Preparing CXL With Linux 5.18” https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-CXL

关键词: Linux, Intel, CXL

  • Linux 5.18 中针对 RISC-V 的新特性

Notable with the RISC-V additions for Linux 5.18 is sv57 support for 5-level page tables. It was just with the prior kernel that sv48 was added for 4-level page tables on RISC-V while this new kernel brings it up to 57-bit page-based virtual memory support for allowing RISC-V systems of the future with even greater memory capacities.

Linux 5.18 内核中合入了针对 RISC-V 架构的更新,其中值得注意的是实现了 sv57,实现了对 5 级页表的支持。考虑到上一个内核(5.17)中我们才刚刚为 RISC-V 上的 4 级页表添加了 sv48 支持,这次升级的速度实在是太快了,这将允许未来的 RISC-V 系统支持更大的内存容量。

其他 5.18 中针对 RISC-V 的改进还包括:进一步改进了对 Microchip PolarFire 的支持,对这款 FPGA SoC 的支持是于去年 Linux 5.13 中引入的。在 Linux 5.18 中,PolarFire SoC 和 ICICLE 开发板得到了改进,这将允许上游的 Linux 内核可以在硬件上正常运行而无需任何额外修改。

针对 RISC-V 还有一个新的 memmove() 实现,之前的 memmove()没有正确检查内存对齐,可能会导致内核在某些系统上崩溃。

对于那些希望在 RISC-V 上使用 Linux 内核的 perf 子系统的人来说,Linux 5.18 的 RISC-V 将支持 much more useful perf implementation

最后一个值得注意的重要改进是 RISC-V 上支持了 Restartable Sequences “RSEQ”,这对系统性能有好处。

更多介绍请访问新闻原文出处,“RISC-V Gets Sv57-Based Virtual Memory, Other Improvements For Linux 5.18” https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-RISC-V

关键词: Linux, RISCV-V

  • Linux 5.18 将正式从 C89 切换到 C11/GNU11

As we approach the end of the first week of the Linux 5.18 merge window, another note worthy pull request to land is the switching of the C language standard from GNU89 (C89) to GNU11 (C11).

在 Linux 5.18 合并窗口的第一周快结束时,另一个值得注意的 pull request 是将 C 语言标准从 GNU89 (C89) 切换到 GNU11 (C11)。

源于内核中有关 list_for_each_entry() 问题,包括 Linus Torvalds 本人在内的上游内核开发人员开始讨论内核的 C 版本要求以及迁移到更新的 C 标准的好处。自去年 Linux 5.15 以来,编译内核的 GCC 编译器的最低版本要求被提高到 5.1,因此在不引入任何和编译器有关的新改动的情况下从 C89 迁移到 C11 被认为是安全的。

因此,在 Linux 5.18 中,直接从 C89 升级到了 C11,中间直接跳过了 C99。 Linux 内核继续支持 ISO C 标准的 GNU 定制语法。Linux 内核之前已经启用了一些较新的 C 扩展,现在对于内核代码,可以安全地默认采用 “-std=gnu11”。

更多介绍请阅读新闻出处,“The Switch Has Been Made From C89 To C11/GNU11 With Linux 5.18”: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-Does-C11

关键词: Linux, C89, C11

  • Linux 5.18 从零长度数组切换到灵活数组

Back in 2020 the Linux kernel tried adding flexible array members to replace zero length arrays but that time the code was reverted shortly thereafter. For Linux 5.18 the tree-wide change of replacing zero length arrays with C99 flexible array members was merged and appears to be all in good shape this time.

早在 2020 年,Linux 内核就尝试使用 “flexible array members”(形如 int a[];) 来替换 “zero length arrays”(形如 int a[0];),但这部分修改后不久就被取消了。而在 Linux 5.18 中,合入了一个补丁,该补丁将整个代码树中所有使用 “zero length arrays” 的地方采用符合 C99 标准的 “flexible array members” 方式进行了替换。引入这个修改的原因是因为 PR 的提交者 Gustavo Silva 认为在计算数组大小时,采用 “flexible array members” 方式比 “zero length arrays” 方式更可靠,编译器可以更好地检查出潜在的问题。

“flexible array members” 特性在 C99 中引入,而 Linux 5.18 已经从 C89 全面升级到支持 C11,所以自然也支持了 C99。有关该补丁的更多详细信息,请参阅内核文档 https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays

更多介绍请阅读新闻出处,“Linux 5.18 Switches From Zero Length Arrays To Flexible Array Members”: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-Flexible-Arrays

关键词: Linux, C

  • MGLRU 有望在 Linux 5.19 中推出

MGLRU is a kernel innovation we’ve been eager to see merged in 2022 and it looks like that could happen for the next cycle, v5.19, for improving Linux system performance especially in cases of approaching memory pressure.

MGLRU 是一项我们一直渴望在 2022 年合入内核的创新特性,看起来这可能会在下一个版本 v5.19 中发生,该特性用于提高 Linux 系统性能,尤其是在内存压力比较大的情况下。

MGLRU 是 Multi-Gen LRU 的缩写,是 Google 工程师对内核中页面回收代码的改进。他们发现当前的 Linux 内核页面回收处理成本太高,并且可能会做出糟糕的回收选择。MGLRU 在应用于 Google 内部的系统运行和外部各方测试中都被证明是一个很大的改进。从这些基准测试结果来看,MGLRU 改进使得 Apache Cassandra、Hadoop、Memcached、PostgreSQL、Redis、MongoDB、FIO 和许多其他工作的运行效率都得到了很大提高。甚至对于在经常面临系统内存压力和 SWAP 风暴时运行带有许多 tabs 的 Web 浏览器的情况,MGLRU 也使系统保持较好的运行状态。

Google 的 Yu Zhao 今天向 Linus 发送了 MGLRU 的拉取请求。虽然目前 Linux 5.18 合并窗口正在进行中,但 Yu 表示这个特性不是一定需要被合入,"This is more of an option than a request for 5.18. I'm sending it to you directly because, in my judgement, it's now as ready as it'll ever be."。Linus Torvalds 表示他并不反对这个补丁,但他表示不会将其合入 Linux 5.18。原因是 MGLRU 尚未通过 linux-next 进行全面审查。他希望看到这个大型补丁系列在 Linux-Next 中运行一段时间,以帮助发现可能存在的问题。

所以目前来看 Mutli-Gen LRU 会先进入 Linux-Next,如果一切顺利,它可以在今年夏天被合并到 Linux 5.19。

新闻出处,“MGLRU Could Land In Linux 5.19 For Improving Performance - Especially Low RAM Situations”: https://www.phoronix.com/scan.php?page=news_item&px=MGLRU-Not-For-5.18

关键词: Linux, MGLRU

  • Asahi Linux 发布了在 Apple Silicon 上运行 Linux 的第一个 Alpha 版本

The Asahi Linux project for running Linux on Apple Silicon (currently the Apple M1 SoCs) is out with its first official alpha release.

上个月 19 日,Asahi Linux 项目发布了它的第一个 alpha 版本,这使得 Apple Silicon 得玩家可以更方便地运行 Linux。这个里程碑仅适用于 “developers and power users”。借助此 alpha 版本,在运行 macOS 12.3 及更高版本的系统上,可以通过简单的终端命令轻松地在 Apple AArch64 硬件上运行 Asahi Linux Alpha。

Asahi Linux 的初始 alpha 版本适用于 M1 / M1 Pro / M1 Max 硬件,最近推出的 Mac Studio 除外。在 macOS 12.3 及以上版本上需要具有 root/admin 访问权限才能安装。该安装程序允许安装完整的 Asahi Linux 桌面版本或者基于 Arch Linux for Arm 的最小安装版本,或者只是在 UEFI 环境下运行。安装程序还支持双启动,也就是是说安装了 Linux 后还可以动态切换回 macOS。

这个初始 Asahi Linux alpha 版本已经过测试,经验证 WiFi、USB、NVMe、显示功能、以太网和其他基本功能可以正常工作。然而,3D GPU 加速还没有工作,Mac Mini 只能使用 HDMI 输出,耳机输出功能在 M1 系统上模拟的,USB3 / 扬声器 / 显示控制器功能也尚未连接。进一步的工作是启用 GPU 加速,支持 DisplayPort 和 Thunderbolt、蓝牙、神经引擎功能、视频加速、CPU 深度空闲、睡眠模式、相机集成和其他功能。

想要试用这个 Asahi Linux alpha 版本或了解更多当前里程碑的信息,可以访问 AsahiLinux.org 网站 https://asahilinux.org/2022/03/asahi-linux-alpha-release/

新闻出处,“Asahi Linux Issues First Alpha Release For Running Linux On Apple Silicon”: https://www.phoronix.com/scan.php?page=news_item&px=Asahi-Linux-Apple-M1-Alpha

关键词: Asahi Linux,Apple, M1

  • GCC 12 支持 LoongArch

While in the “stage four” final phase of GCC 12 development with this open-source compiler due for its stable release in about one month’s time, LoongArch has been merged. Due to a new CPU port not risking existing compiler code, the LoongArch code was able to land following the crucial approval of the GCC steering committee.

在 GCC 12 开发周期 “stage four” 面临结束的最后时刻,在离稳定版发布还剩下大约一个月的时候,GCC 合入了对 LoongArch 的支持。考虑到加入新的 CPU 支持并不会影响现有其他的功能,所以 GCC steering committee 最终还是在当前这个关键的时刻通过并合入了 LoongArch 补丁。

LoongArch 是 Loongson 公司在多年来提供多种 MIPS 硬件之后其自行研发的 CPU 架构。考虑到开源社区已经不再积极开发 MIPS CPU 架构,他们不得不将其改进演化成自己的 CPU 设计。目前基于 LoongArch 的龙芯 3A5000 CPU 还无法与当今的 Intel、ARM 或 AMD CPU 竞争,让我们期待它在未来的硬件中能够如何进化。

新闻出处,“LoongArch Port Merged For GCC 12”: https://www.phoronix.com/scan.php?page=news_item&px=LoongArch-Merged-GCC-12

关键词: GCC,LoongArch

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: