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

泰晓Linux实验盘,即刻上手内核与嵌入式开发
请稍侯

泰晓资讯·5 月 / 第二期 / 2022

unicornx 创作于 2022/05/05

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

  • Linux 内核最新消息

https://lkml.org/lkml/2022/5/1/287

最新发布的 Linux 5.18-rc5 在以往的 “-rc5” 版本大一点,但也不算太糟。修改量有所增大可能只是因为上周没有来得及合入的内容被延迟到本周的版本中发布所导致。

本周发布的 RC 版本中的变化没有什么特别值得关注,唯一引起 Linus 注意的是在这个阶段看到的更多的补丁。就过去一周的修复而言,这个 Linux 5.18-rc5 内核并没有太多需要注意的地方,可能唯一值得提一下的是 Gigabyte-WMI 传感器驱动程序新支持了另一个 Gigabyte 的主板。

不出意外,Linux 5.18 应该会在 5 月底左右发布。

https://www.kernel.org/ updated by 2022/5/5

分支类型版本发布时间
mainline5.18-rc52022-05-01
stable5.17.52022-04-27
stable5.16.20 [EOL]2022-04-13
longterm5.15.372022-05-01
longterm5.10.1132022-04-27
longterm5.4.1912022-04-27
longterm4.19.2412022-05-01
longterm4.14.2772022-04-27
longterm4.9.3122022-04-27
linux-nextnext-202205042022-05-04

关键词: Linux

  • Linux 5.19 中添加了使用 Sysfs 启动固件更新的功能

In addition to driver-core-next having queued up the long-awaited Zstd compressed firmware support ahead of the Linux 5.19 kernel, another change readied is allowing support for initiating firmware updates for supported drivers via sysfs.

driver-core-next 分支上等待合入 Linux 5.19 内核的补丁除了期待已久的采用 Zstd 算法压缩固件的修改之外(具体请参考上一期资讯的介绍),另一个准备好的变化是允许支持通过 sysfs 为支持的驱动程序启动固件更新。这项贡献来自 Intel,通过在 sysfs 中添加固件上传支持后,我们可以在用户空间编写代码来启动固件更新。

对于 /sys/class/firmware/ 下支持的设备驱动程序,sysfs 中新增了 dataloadingtimeout 这些个特殊的文件,我们可以通过读写这些特殊文件控制和触发固件更新。用户空间具体的操作大概是这样:首先对 loading 文件写入 “1” 表示启动加载固件,然后我们可以将固件的二进制文件内容通过 cat 等方式写入 data 文件,完成后再对 loading 文件写入 “0” 表示结束即可。此后,内核将启动 hook 函数继续将固件上传到具体设备。

Intel 工程师之所以开发该功能其动机是让他们基于 FPGA 的 PCIe 卡在启动后能够从用户空间触发固件更新。但是,其他驱动也可以利用该方式通过 sysfs 进行动态固件上传和更新而无需将其安装到 /lib/firmware 下再进行更新。

更多介绍请阅读新闻出处,“Linux 5.19 Adding Ability To Initiate Firmware Updates Using Sysfs​”: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.19-FW_UPLOAD-sysfs

关键词: Linux, firmware, sysfs

  • Linux 开发人员讨论对内存分层的改进

Already within the Linux kernel there is initial support for tiered memory servers for dealing with platforms like those with Intel Optane DC Persistent Memory for being able to promote/demote pages to slower classes of memory when the speedy system RAM is under pressure. But with more tiered memory servers coming about especially with HBM classes of memory, Google and other vendors are discussing better handling of Linux’s tiered memory interface.

Linux 内核中已经初步支持分级(tiered)内存服务,用于处理诸如 Intel Optane DC 持久内存之类的平台,以便在快速运行的系统上当 RAM 紧张时能够将物理页映射到处理速度较慢的内存类别上或反其道而行之。随着更多提供分级内存的设备的出现,特别是 HBM 这类内存设备,Google 和其他供应商正在讨论更好地处理 Linux 的分级内存接口。

过去的几个内核版本提供了将 active 或者 inactive 的内存页动态映射到相应内存级别的能力。来自 Google 的 Wei Xu 总结了当前 处理接口的一些缺点,以及对此代码可能的改进,特别地,这些改进工作随着 Compute Express Link (CXL) 和其他技术的上市而变得越来越重要。

魏旭将目前的情况总结为:

  • The current tiering initialization code always initializes each memory-only NUMA node into a lower tier. But a memory-only NUMA node may have a high performance memory device (e.g. a DRAM device attached via CXL.mem or a DRAM-backed memory-only node on a virtual machine) and should be put into the top tier.

  • The current tiering hierarchy always puts CPU nodes into the top tier. But on a system with HBM (e.g. GPU memory) devices, these memory-only HBM NUMA nodes should be in the top tier, and DRAM nodes with CPUs are better to be placed into the next lower tier.

  • Also because the current tiering hierarchy always puts CPU nodes into the top tier, when a CPU is hot-added (or hot-removed) and triggers a memory node from CPU-less into a CPU node (or vice versa), the memory tiering hierarchy gets changed, even though no memory node is added or removed. This can make the tiering hierarchy much less stable.

  • A higher tier node can only be demoted to selected nodes on the next lower tier, not any other node from the next lower tier. This strict, hard-coded demotion order does not work in all use cases (e.g. some use cases may want to allow cross-socket demotion to another node in the same demotion tier as a fallback when the preferred demotion node is out of space), and has resulted in the feature request for an interface to override the system-wide, per-node demotion order from the userspace.

对有关 Linux 分级内存处理的一些改进建议和讨论感兴趣的人请访问新闻原文出处,“Linux Developers Discuss Improvements To Memory Tiering” https://www.phoronix.com/scan.php?page=news_item&px=Linux-Better-Memory-Tiering

关键词: Linux, Memory

  • Ubuntu 介绍了如何使用其提供的实时内核 Beta 版本

With last week’s release of the much anticipated Ubuntu 22.04 LTS, Canonical announced they would begin providing a real-time kernel flavor too for this Long Term Support release though that RT kernel is initially in beta form. Today they outlined more information on their real-time kernel beta and how to actually go about trying it out.

上周 Canonical 发布了备受公众期待的 Ubuntu 22.04 LTS 版本,与此同时,Canonical 宣布他们也将开始为这个长期支持版本提供一个实时(real-time,简称 RT)内核,但这个 RT 内核目前还是 beta 版本。今日,Canonical 介绍了有关这个 RT 内核测试版的更多信息。

这个测试版本的 RT 内核支持 x86_64 和 AArch64 两个体系架构的处理器。通过量身定制,可用于满足通讯(teclo)行业、机器人技术、关键基础设施和其他行业的低延迟需求。

Linux 实时补丁 (PREEMPT_RT) 已经存在多年,并正在逐渐进入主线内核。由于 Intel 收购了 Linutronix(其主要技术负责人也是 PREEMPT_RT 的关键维护人员),该实时补丁有望在不久的将来完全合入 Linux 主线版本。一旦 RT 补丁全部主线化,我们只需要在构建内核时切换一下配置就可以启用 RT 内核特性,我们可能会看到更多提供官方 RT 内核构建的 Linux 发行版。

据了解,Canonical 是通过 Ubuntu Advantage 这个计划来支持 RT 内核的。Ubuntu Advantage 是 Canonical 推出的一项 针对 Ubuntu 的 Linux 企业订阅计划,包括扩展的安全维护、内核实时补丁支持、景观支持和其他产品。现在,Ubuntu RT 内核也可以通过该服务进行访问了。

在系统上激活 Ubuntu Advantage for Infrastructure 并最新版本的 Ubuntu Advantage Tools 时,可以通过运行 ua enable realtime-kernel –beta 命令启用实时内核测试版。Ubuntu 的博客文章指出,他们打算将他们的实时内核提升到产品级别,但没有说明他们希望多快将此产品从测试版转移到产品级别。

更多介绍请阅读新闻出处,“Ubuntu Outlines How To Use Its Real-Time Kernel Beta - It Requires Ubuntu Advantage”: https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-RT-Kernel-Setup-UA

关键词: Ubuntu, real-time

  • GNU 调试器 12.1 发布

Released on Sunday was GDB 12.1 as the newest version of the GNU Debugger.

GDB 12.1 于本月 2 日发布,它是 GNU 调试器的最新版本。GDB 12.1 带来了许多变化,包括:

  • GDB 12.1 新增支持在 Linux 上调试 LoongArch 这个新的 ARCH。
  • OpenRISC CPU 架构在 GDB 12.1 中得到进一步改进。现在在 Linux 上支持 OpenRISC or1k 的本地配置,现在也支持 GDBserver。 OpenRISC 并不像 RISC-V 那样受到关注,但这种开源处理器架构确实在不断进步,并拥有一些忠实的开发人员和追随者。
  • 另一个值得注意的变化是 GDB 的多线程符号加载。现在该特性默认启用。早在 2020 年的 GDB 9.1 中,它就引入了多线程符号加载,作为在现代多核系统上提高性能的一种手段。现在使用 GDB 12.1,多线程代码被认为足够安全,可以默认启用。
  • 其他 GNU Debugger 12.1 的更改包括 Python API 改进、改进的 C++ 模板支持、FreeBSD 本机目标的异步模式以及其他调试增强功能。

通过 SourceWare.org (https://www.sourceware.org/gdb/)下载有关 GDB 12.1 版本的更多详细信息。

更多介绍请阅读新闻出处,“GNU Debugger 12.1 Released With Multi-Threaded Symbol Loading By Default”: https://www.phoronix.com/scan.php?page=news_item&px=GNU-Debugger-GDB-12.1

关键词: GDB

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: