mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-11-15 13:04:18 +08:00
description/open_source: update phoronix vs LWN to date 20230315
This commit is contained in:
1 parent
9f0c1960d2
commit
5a02fb8080
6 files changed
+192
-36
No files matched your search
@@ -72,6 +72,8 @@ blogexcerpt: 虚拟化 & KVM 子系统
|
||||
|
||||
[bpftrace Cheat Sheet](https://www.brendangregg.com/BPF/bpftrace-cheat-sheet.html)
|
||||
|
||||
[Standardizing BPF](https://lwn.net/Articles/926882)
|
||||
|
||||
# 2 工作流程
|
||||
-------
|
||||
|
||||
@@ -548,13 +550,20 @@ Wasmtime 完全开源, 使用 Rust 编程语言, 是的, 并且符合 WASI 标
|
||||
| [Introduction to Parca - Part 1](https://www.polarsignals.com/blog/posts/2023/01/19/introduction-to-parca-agent) | Parca 是一个基于 eBPF 在线采样工具. |
|
||||
| [DWARF-based Stack Walking Using eBPF](https://www.polarsignals.com/blog/posts/2022/11/29/profiling-without-frame-pointers) | NA |
|
||||
|
||||
## X.2 eBPF 月报
|
||||
## X.3 eBPF 月报
|
||||
-------
|
||||
|
||||
|
||||
[ebpf 月报 - 2023 年 1 月](https://segmentfault.com/a/1190000043355631)
|
||||
|
||||
|
||||
## X.4 业界论文
|
||||
-------
|
||||
|
||||
| 论文 | 描述 |
|
||||
|:---:|:----:|
|
||||
| [Flexible and Low-Overhead System-Call Aggregation using BPF](https://www4.cs.fau.de/Ausarbeitung/MA-I4-2021-12-Gerhorst.pdf)<br>[AnyCall: Fast and Flexible System-Call Aggregation](https://dl.acm.org/doi/10.1145/3477113.3487267) | 通过 eBPF 实现的 ANYCALL, 它使用内核内字节码编译器在内核模式下执行安全检查的用户代码. 这允许多个快速的系统调用与错误检查和处理逻辑交织聚合在一起, 只使用一次用户态 / 内核态转换. 并将其扩展为支持系统调用和用户内存访问. 由于内核已经支持灵活的事件处理和调试, 重用 BPF 来实现系统调用聚合, 这表明软件隔离进程对于现代通用操作系统是可行的. 为了证明将真实的用户应用程序移植到 ANYCALL 既实用又直接, 我移植了两个真实的工具, 并记录了所需的代码更改. 最后, 我评估了 ANYCALL 在具有操作系统级缓解措施的系统上的性能, 以对抗活跃或不活跃的瞬时执行漏洞, 包括例如针对 Meltdown 的内核页表隔离 (KPTI). 在 KPTI 不活跃的系统上, 我演示了在计算受限的实际应用程序中高达 10% 的加速. 另一方面, 当 KPTI 处于活动状态时, 我的评估表明, 使用 ANYCALL 可以使系统调用爆发速度提高 98%, 而实际应用程序的速度提高了 32% 到 40%. 参见 [【欧拉多咖 | OS每周快讯】2022.12.06~2022.12.12](https://www.chaspark.com/#/hotspots/821172234535870464) |
|
||||
| [XRP: In-Kernel Storage Functions with eBPF【OSDI’22】](https://www.usenix.org/system/files/osdi22-zhong_1.pdf) | XRP 框架允许应用程序从 NVMe 驱动程序中的 eBPF 探针执行用户定义的存储功能, 如索引查找或聚合, 从而安全地绕过内核的大部分存储堆栈. 为了保持文件系统语义, XRP 将少量内核态转移到其 NVMe 驱动程序探针, 并在探针处调用用户注册的 eBPF 函数. |
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
@@ -258,6 +258,10 @@ $reclaim = current\_mem \times reclaim\_ratio \times max(0,1 – \frac{psi_some}
|
||||
# 9 PRINTK
|
||||
-------
|
||||
|
||||
|
||||
## 9.1 Printk Improve
|
||||
-------
|
||||
|
||||
[Enhanced printk() with Enterprise Event Logging](http://evlog.sourceforge.net/enhanced_printk.html)
|
||||
|
||||
|
||||
@@ -268,6 +272,11 @@ $reclaim = current\_mem \times reclaim\_ratio \times max(0,1 – \frac{psi_some}
|
||||
| 2018/11/24 | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | [printk: Add caller information to printk() output.](https://lore.kernel.org/lkml/1543045075-3008-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp) | NA | v1 ☑ 5.1-rc1 | [PatchWork 0/3,v4](https://lore.kernel.org/lkml/1543045075-3008-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp)<br>*-*-*-*-*-*-*-* <br>[关键 commit 15ff2069cb7f](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=15ff2069cb7f967dae6a8f8c176ba51447c75f00) |
|
||||
| 2021/10/12 | "Matthew Wilcox (Oracle)" <willy@infradead.org> | [Improvements to %pGp](https://patchwork.kernel.org/project/linux-mm/patch/20211012182647.1605095-6-willy@infradead.org) | `%pGp` 用来打印 page flag 的信息(通过 format_page_flags() 打印 `__def_pageflag_name`), 但是之前打印的方式比较麻烦, 需要使用 `%#lx(%pGp)`, 先用 hex 16 进制打印一次, 再用 `%pGp` 打印一次, 使用起来略显麻烦. 因此修改 `%pGp` 在打印 flag 的同时, 同时用 hex 打印一次. 这样单用 `%pGp` 就可以完成输出. | v1 ☐ | [PatchWork](https://patchwork.kernel.org/project/linux-mm/patch/20211012182647.1605095-6-willy@infradead.org) |
|
||||
| 2017/11/08 | Linus Torvalds <torvalds@linux-foundation.org> | [stop using '%pK' for /proc/kallsyms pointer values](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c0f3ea1589394deac2d840c685f57c69e4ac4243) | commit [c0f3ea158939 stop using '%pK' for /proc/kallsyms pointer values](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c0f3ea1589394deac2d840c685f57c69e4ac4243) 4.15 之后, kallsyms 不用 %pK 打印了. 但是仍然用 kptr_restrict 控制权限. | v1 ☑ 5.1-rc1 | [ommit c0f3ea158939](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c0f3ea1589394deac2d840c685f57c69e4ac4243) |
|
||||
| 2022/04/27 | Guilherme G. Piccoli <gpiccoli@igalia.com> | [The panic notifiers refactor](https://lore.kernel.org/all/20220427224924.592546-1-gpiccoli@igalia.com) | 20220427224924.592546-1-gpiccoli@igalia.com | v1 ☐☑✓ | [LORE v1,0/30](https://lore.kernel.org/all/20220427224924.592546-1-gpiccoli@igalia.com) |
|
||||
| 2023/01/30 | Hyeonggon Yoo <42.hyeyoo@gmail.com> | [mm, printk: introduce new format for page_type](https://patchwork.kernel.org/project/linux-mm/cover/20230130042514.2418-1-42.hyeyoo@gmail.com/) | 716768 | v4 ☐☑ | [LORE v4,0/3](https://lore.kernel.org/r/20230130042514.2418-1-42.hyeyoo@gmail.com) |
|
||||
|
||||
## 9.2 threaded/atomic console support
|
||||
-------
|
||||
|
||||
[Linux 5.10 Begins Landing The Long Overdue Revamp Of printk()](https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.10-printk)
|
||||
|
||||
@@ -287,7 +296,6 @@ $reclaim = current\_mem \times reclaim\_ratio \times max(0,1 – \frac{psi_some}
|
||||
| 2020/07/21 | John Ogness <john.ogness@linutronix.de> | [printk: ringbuffer: support dataless records](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d397820f36ffe4701343b6ee12687d60db0ed8db) | 20200721132528.9661-1-john.ogness@linutronix.de | v2 ☑ 5.10-rc1 | [LORE](https://lore.kernel.org/all/20200721132528.9661-1-john.ogness@linutronix.de) |
|
||||
| 2020/09/14 | John Ogness <john.ogness@linutronix.de> | [printk: reimplement LOG_CONT handling](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=f5f022e53b874f978dda23847173cbf2589b07f5) | 20200914123354.832-6-john.ogness@linutronix.de | v5 ☑ 5.10-rc1 | [LORE v5,0/6](https://lore.kernel.org/all/20200914123354.832-1-john.ogness@linutronix.de) |
|
||||
| 2020/09/19 | John Ogness <john.ogness@linutronix.de> | [printk: move dictionaries to meta data](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=f5f022e53b874f978dda23847173cbf2589b07f5) | 20200918223421.21621-1-john.ogness@linutronix.de | v2 ☑ 5.10-rc1 | [LORE v2,0/3](https://lore.kernel.org/all/20200918223421.21621-1-john.ogness@linutronix.de) |
|
||||
| 2022/04/27 | Guilherme G. Piccoli <gpiccoli@igalia.com> | [The panic notifiers refactor](https://lore.kernel.org/all/20220427224924.592546-1-gpiccoli@igalia.com) | 20220427224924.592546-1-gpiccoli@igalia.com | v1 ☐☑✓ | [LORE v1,0/30](https://lore.kernel.org/all/20220427224924.592546-1-gpiccoli@igalia.com) |
|
||||
|
||||
|
||||
[Linux 5.19's Printk To Offload Messages To Per-Console KThreads](https://www.phoronix.com/news/Linux-Threaded-Console-Print)
|
||||
@@ -299,12 +307,18 @@ $reclaim = current\_mem \times reclaim\_ratio \times max(0,1 – \frac{psi_some}
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2022/02/07 | John Ogness <john.ogness@linutronix.de> | [implement threaded console printing](https://lore.kernel.org/all/20220207194323.273637-1-john.ogness@linutronix.de) | 参见 phoronix 报道 [Linux Gets Patches For Threaded Console Printing](https://www.phoronix.com/scan.php?page=news_item&px=Linux-Threaded-Console-Print) 和 [Patches Updated For Linux To Enjoy Consoles Running At Full-Speed](https://www.phoronix.com/scan.php?page=news_item&px=Printk-v3-Consoles-Full-Speed) | v1 ☐ | [LORE v1,0/13](https://lore.kernel.org/all/20220207194323.273637-1-john.ogness@linutronix.de) |
|
||||
| 2022/09/11 | Thomas Gleixner <tglx@linutronix.de> | [printk: A new approach - WIP](https://lore.kernel.org/all/20220910221947.171557773@linutronix.de) | | v1 ☐☑✓ | [LORE v1,0/29](https://lore.kernel.org/all/20220910221947.171557773@linutronix.de) |
|
||||
| 2023/03/02 | John Ogness <john.ogness@linutronix.de> | [threaded/atomic console support](https://lore.kernel.org/all/87wn3zsz5x.fsf@jogness.linutronix.de) | TODO | v1 ☐☑✓ | [LORE v1,0/18](https://lore.kernel.org/all/87wn3zsz5x.fsf@jogness.linutronix.de) |
|
||||
|
||||
|
||||
## 9.3 A new approach printk
|
||||
-------
|
||||
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2023/01/30 | Hyeonggon Yoo <42.hyeyoo@gmail.com> | [mm, printk: introduce new format for page_type](https://patchwork.kernel.org/project/linux-mm/cover/20230130042514.2418-1-42.hyeyoo@gmail.com/) | 716768 | v4 ☐☑ | [LORE v4,0/3](https://lore.kernel.org/r/20230130042514.2418-1-42.hyeyoo@gmail.com) |
|
||||
| 2022/09/11 | Thomas Gleixner <tglx@linutronix.de> | [printk: A new approach - WIP](https://lore.kernel.org/all/20220910221947.171557773@linutronix.de) | | v1 ☐☑✓ | [LORE v1,0/29](https://lore.kernel.org/all/20220910221947.171557773@linutronix.de) |
|
||||
|
||||
|
||||
|
||||
|
||||
# 10 KEXEC
|
||||
@@ -811,15 +825,19 @@ https://patchwork.kernel.org/project/linux-trace-devel/list/?submitter=200911&st
|
||||
| 2021/10/8 | Jiri Olsa <jolsa@kernel.org> | [x86/ftrace: Add direct batch interface](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=5fae941b9a6f95773df644e7cf304bf199707876) | 1615872606-56087-1-git-send-email-aubrey.li@intel.com | v2 ☑✓ 5.16-rc1 | [LKML v2,0/8](https://lkml.org/lkml/2021/10/8/186), [LORE v2,0/8](https://lore.kernel.org/all/20211008091336.33616-1-jolsa@kernel.org) |
|
||||
|
||||
|
||||
## 14.8 user_events
|
||||
## 14.8 uprobe
|
||||
-------
|
||||
|
||||
### 14.8.1 user events
|
||||
-------
|
||||
|
||||
User Events 于 [5.18-rc1](https://kernelnewbies.org/Linux_5.18#User_events) 合入主线, 参见 Document [user_events: User-based Event Tracing](https://www.kernel.org/doc/html/latest/trace/user_events.html) 以及 example [`samples/user_events/example.c`](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/samples/user_events/example.c?id=c57eb4781509)
|
||||
|
||||
[User events — but not quite yet](https://lwn.net/Articles/889607)
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2022/01/18 | Beau Belgrave <beaub@linux.microsoft.com> | [user_events: Enable user processes to create and write to trace events](https://lore.kernel.org/all/20220118204326.2169-1-beaub@linux.microsoft.com) | 20220118204326.2169-1-beaub@linux.microsoft.com | v10 ☐☑✓ | [LORE v10,0/12](https://lore.kernel.org/all/20220118204326.2169-1-beaub@linux.microsoft.com) |
|
||||
| 2022/01/18 | Beau Belgrave <beaub@linux.microsoft.com> | [user_events: Enable user processes to create and write to trace events](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=864ea0e10cc90416a01b46f0d47a6f26dc020820) | Linux 已经有一种方法允许使用内核跟踪工具(uprobes)跟踪用户空间进程. 此版本添加了一个新的 ABI, 允许进程创建和写入与内核跟踪级别事件隔离的跟踪事件. 这样可以更快地跟踪用户模式数据, 并打开托管代码以参与跟踪事件, 其中存根位置为 dynamic.<br>进程通常只希望仅在有用时才进行跟踪. 进程可以将描述事件格式的事件注册到内核. 内核将创建事件. 然后, 该进程将从映射的 tracefs 文件中接收页面映射中的一个字节, 它可以检查该文件. 特权任务可以启用该事件, 这会将映射的字节更改为 true. 然后, 进程可以开始将事件写入跟踪 buffer. 参见 [User events — but not quite yet](https://lwn.net/Articles/889607). | v10 ☑✓ [5.18-rc1](https://kernelnewbies.org/Linux_5.18#User_events) | [LORE v10,0/12](https://lore.kernel.org/all/20220118204326.2169-1-beaub@linux.microsoft.com) |
|
||||
| 2023/03/28 | Beau Belgrave <beaub@linux.microsoft.com> | [tracing/user_events: Remote write ABI](https://lore.kernel.org/all/20230328235219.203-1-beaub@linux.microsoft.com) | 之前的 API 使用起来并不方便, 因此进行了重构. 参见 [User trace events, one year later](https://lwn.net/Articles/927595). 当前正在使用一个需要 mmap() 的共享页面. 删除共享页面实现并移动到用户注册地址实现. 在这个新模型中, 从用户程序注册事件期间指定了 3 个新值. 第一个是启用或禁用事件时要更新的地址. 第二个是要设置/清除的位, 以反映正在启用的事件. 第三个是指定地址的值的大小. 这允许在用户程序中使用本地 32/64 位值来支持内核跟踪程序和用户跟踪程序. 例如, 当事件启用时, 为内核跟踪程序设置第 31 位允许用户跟踪程序使用其他位作为引用计数或其他标志. 内核端原子地更新位, 用户程序也需要原子地更新这些值. 用户提供的地址必须在自然边界上对齐, 这允许单页检查, 并防止奇怪的行为, 如跨 2 页而不是单页的启用值. 当遇到页面错误时, 它们将通过工作队列异步完成. 如果页面错误返回, 则再次尝试写更新. 如果页面不能故障进入, 那么我们将登录并等待下一次事件被启用/禁用. 这是为了防止由于不良用户进程在注册地址后取消映射或更改保护值而导致的无限循环. | v10 ☐☑✓ | [LORE v10,0/12](https://lore.kernel.org/all/20230328235219.203-1-beaub@linux.microsoft.com)|
|
||||
|
||||
|
||||
|
||||
@@ -864,15 +882,24 @@ LWN 上也对此进行了[汇总报道](https://lwn.net/Kernel/Index/#Android-Ge
|
||||
## 17.1 启动加速
|
||||
-------
|
||||
|
||||
Fedora 尝试优化 systemd 开机以及重启的时间, 参见 phoronix 报道 [Fedora 38 Wants To Make Sure Shutdowns & Reboots Are Faster](https://www.phoronix.com/news/Fedora-38-Faster-Reboots) 以及 [Fedora wiki--Changes/Shorter Shutdown Timer](https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer).
|
||||
|
||||
### 17.1.1 启动优化
|
||||
-------
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2021/03/21 | Rasmus Villemoes <linux@rasmusvillemoes.dk> | [background initramfs unpacking, and CONFIG_MODPROBE_PATH](https://lore.kernel.org/patchwork/patch/1394812) | 启动阶段异步解压 initramfs. 可以加速系统启动. | v1 ☑ [5.13-rc1](https://kernelnewbies.org/Linux_5.13) | [Patchwork](https://lore.kernel.org/patchwork/patch/1394812) |
|
||||
| 2021/11/21 | David Woodhouse <dwmw2@infradead.org> | [Parallel CPU bringup for x86_64](https://lkml.org/lkml/2021/12/9/664) | 随着核数的增多, 内核的启动速度越来越慢. 这组补丁能够并行启动辅助 (x86_64) CPU 内核. 对 v6 测hi发现可以显著改善 Sapphire Rapids CPU 系统的启动时间, 从 71s 降低到 14s. 随后 v7 增加了对 AMD CPU 的支持. | v1 ☐ | [LWN ](https://lwn.net/Articles/878161), [LKML](https://lkml.org/lkml/2021/12/9/664), [LORE 00/11](https://lkml.kernel.org/lkml/20211209150938.3518-1-dwmw2@infradead.org), [Phoronix 报道 v1](https://www.phoronix.com/news/Linux-x86_64-Parallel-CPU-Boot)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/9](https://lore.kernel.org/lkml/20211215145633.5238-1-dwmw2@infradead.org), [Phoronix 报道 v3](https://www.phoronix.com/news/Parallel-CPU-Bringup-AMD-Snag)<br>*-*-*-*-*-*-*-* <br>[LORE v6](https://lore.kernel.org/lkml/20230202215625.3248306-1-usama.arif@bytedance.com), [Phoronix 报道 v6](https://www.phoronix.com/news/Linux-CPU-Parallel-Bringup-2023)<br>*-*-*-*-*-*-*-* <br>[LORE v7](20230207230436.2690891-1-usama.arif@bytedance.com) |
|
||||
| 2022/11/02 | Stuart Hayes <stuart.w.hayes@gmail.com> | [cpufreq: acpi: Defer setting boost MSRs](https://lore.kernel.org/all/20221102195957.82871-1-stuart.w.hayes@gmail.com) | [Deferred Enabling Of ACPI CPUFreq Boost Support Can Help Boot Times For Large Servers](https://www.phoronix.com/news/CPUFreq-Defer-Boost-MSRs) | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20221102195957.82871-1-stuart.w.hayes@gmail.com) |
|
||||
|
||||
Fedora 尝试优化 systemd 开机以及重启的时间, 参见 phoronix 报道 [Fedora 38 Wants To Make Sure Shutdowns & Reboots Are Faster](https://www.phoronix.com/news/Fedora-38-Faster-Reboots) 以及 [Fedora wiki--Changes/Shorter Shutdown Timer](https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer).
|
||||
### 17.1.2 并行 CPU BringUp
|
||||
-------
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2021/11/21 | David Woodhouse <dwmw2@infradead.org> | [Parallel CPU bringup for x86_64](https://lkml.org/lkml/2021/12/9/664) | 随着核数的增多, 内核的启动速度越来越慢. 这组补丁能够并行启动辅助 (x86_64) CPU 内核. 对 v6 测hi发现可以显著改善 Sapphire Rapids CPU 系统的启动时间, 从 71s 降低到 14s. 随后 v7 增加了对 AMD CPU 的支持. | v1 ☐ | [LWN ](https://lwn.net/Articles/878161), [LKML](https://lkml.org/lkml/2021/12/9/664), [LORE 00/11](https://lkml.kernel.org/lkml/20211209150938.3518-1-dwmw2@infradead.org), [Phoronix 报道 v1](https://www.phoronix.com/news/Linux-x86_64-Parallel-CPU-Boot)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/9](https://lore.kernel.org/lkml/20211215145633.5238-1-dwmw2@infradead.org), [Phoronix 报道 v3](https://www.phoronix.com/news/Parallel-CPU-Bringup-AMD-Snag)<br>*-*-*-*-*-*-*-* <br>[LORE v6](https://lore.kernel.org/lkml/20230202215625.3248306-1-usama.arif@bytedance.com), [Phoronix 报道 v6](https://www.phoronix.com/news/Linux-CPU-Parallel-Bringup-2023)<br>*-*-*-*-*-*-*-* <br>[LORE v7](20230207230436.2690891-1-usama.arif@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v17,0/8](https://lore.kernel.org/lkml/20230328195758.1049469-1-usama.arif@bytedance.com) |
|
||||
| 2023/04/15 | Thomas Gleixner <tglx@linutronix.de> | [cpu/hotplug, x86: Reworked parallel CPU bringup](https://lore.kernel.org/all/20230414225551.858160935@linutronix.de) | [Reworked x86_64 Parallel Boot Support Posted For The Linux Kernel](https://www.phoronix.com/news/Linux-Parallel-Boot-x86-Rework) | v1 ☐☑✓ | [LORE v1,0/37](https://lore.kernel.org/all/20230414225551.858160935@linutronix.de) |
|
||||
|
||||
|
||||
|
||||
# 18 LIB
|
||||
@@ -933,7 +960,15 @@ Fedora 尝试优化 systemd 开机以及重启的时间, 参见 phoronix 报道
|
||||
[Linux 6.2 Speeds Up A Function By 715x - kallsyms_lookup_name()](https://www.phoronix.com/news/Linux-6.2-Modules)
|
||||
|
||||
|
||||
# X 学习参考
|
||||
-------
|
||||
|
||||
## X.1 业界论文
|
||||
-------
|
||||
|
||||
| 论文 | 描述 |
|
||||
|:---:|:----:|
|
||||
| [Hubble: Performance Debugging with In-Production, Just-In-Time Method Tracing on Android](https://www.usenix.org/system/files/osdi22-luo.pdf) | Hubble是一个method-tracing系统, 在所有支持的和即将由华为制造的安卓设备上运行, 以帮助调试性能问题. Hubble instruments every non-inlined bytecode method’s entry and exit, 以记录method的名称和时间戳. trace points被记录到一个内存中的环形缓冲器中, 旧的数据会不断被覆盖. 这些数据只有在检测到性能问题时才会被保存下来, 使工程师在检测到异常情况之前就能及时获得宝贵的、详细的运行时间数据. 参见 [datawine-论文阅读](https://datawine.github.io/paper-reading.html), 参见 [【欧拉多咖 | OS每周快讯】2022.12.06~2022.12.12](https://www.chaspark.com/#/hotspots/821172234535870464) |
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
@@ -444,17 +444,34 @@ Peter Zijlstra 在 [RT-Summit 2017](https://wiki.linuxfoundation.org/realtime/ev
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2018/10/09 | Juri Lelli <juri.lelli@redhat.com> | [Towards implementing proxy execution](https://lore.kernel.org/all/20181009092434.26221-1-juri.lelli@redhat.com) | TODO | v1 ☐☑✓ | [LORE v1,0/8](https://lore.kernel.org/all/20181009092434.26221-1-juri.lelli@redhat.com) |
|
||||
| 2020/12/18 | ValenƟn Schneider <valentin.schneider@arm.com> | [Looking forward on proxy execution](https://lpc.events/event/7/contributions/758) | TODO | v1 ☐☑✓ | [GitLab, linux-arm RFC v3,00/08](https://gitlab.arm.com/linux-arm/linux-vs/-/tree/mainline/sched/proxy-rfc-v3/) |
|
||||
| 2022/10/03 | Connor O'Brien <connoro@google.com> | [Reviving the Proxy Execution Series](https://lore.kernel.org/all/20221003214501.2050087-1-connoro@google.com) | TODO | v1 ☐☑✓ | [LORE v1,0/11](https://lore.kernel.org/all/20221003214501.2050087-1-connoro@google.com) |
|
||||
| 2022/10/03 | Connor O'Brien <connoro@google.com> | [Reviving the Proxy Execution Series](https://lore.kernel.org/all/20221003214501.2050087-1-connoro@google.com) | TODO | v1 ☐☑✓ | [2022/10/03 LORE v1,0/11](https://lore.kernel.org/all/20221003214501.2050087-1-connoro@google.com)<br>*-*-*-*-*-*-*-* <br>[2023/03/20 LORE v2,0/12](https://lore.kernel.org/all/20230320233720.3488453-1-jstultz@google.com)<br>*-*-*-*-*-*-*-* <br>[2023/04/11 LORE v3,00/14](https://lore.kernel.org/all/20230411042511.1606592-1-jstultz@google.com) |
|
||||
|
||||
|
||||
# 12 深入理解并行编程
|
||||
-------
|
||||
|
||||
|
||||
## 12.1 理论
|
||||
-------
|
||||
|
||||
Paul McKenney's parallel programming book, [LWN](https://lwn.net/Articles/421425), [PerfBook](https://mirrors.edge.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html), [cgit, perfbook](https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/perfbook.git/)
|
||||
|
||||
计算机体系结构基础, [第 10 章 并行编程基础](https://foxsen.github.io/archbase/并行编程基础.html)
|
||||
|
||||
|
||||
## 12.2 并行化框架
|
||||
-------
|
||||
|
||||
[taskflow 的总结: 令人敬畏的并行计算](https://github.com/taskflow/awesome-parallel-computing)
|
||||
|
||||
### 12.2.1 Task/Function Flow
|
||||
-------
|
||||
|
||||
| 项目 | 描述 |
|
||||
|:---:|:----:|
|
||||
| [taskflow/taskflow](https://github.com/taskflow/taskflow) | Function Flow 并行化业界标杆, 犹他大学开发, 支持异构. [官网](https://taskflow.github.io). 论文<br>1. [Taskflow: A Lightweight Parallel and Heterogeneous Task Graph Computing System, TPDS 2021](https://taskflow.github.io/papers/tpds21-taskflow.pdf)<br>2. [Late Breaking Results: Efficient Timing Propagation with Simultaneous Structural and Pipeline Parallelisms, DAC 2022](https://tsung-wei-huang.github.io/papers/dac2022.pdf)<br>3. [Pipeflow: An Efficient Task-Parallel Pipeline Programming Framework using Modern C++, HPDC 2022](https://arxiv.org/abs/2202.00717)<br>4. [From RTL to CUDA: A GPU Acceleration Flow for RTL Simulation with Batch Stimulus, ICPP 2022](https://icpp22.gitlabpages.inria.fr/prog/) |
|
||||
| [ChunelFeng/CGraph](https://github.com/ChunelFeng/CGraph) | ChunelFeng 的图化调度并行框架, 轻量, 快捷, 暂不支持异构 |
|
||||
| [AthrunArthur/functionflow](https://github.com/AthrunArthur/functionflow) | 基于 C++11 的 FunctionFlow 并行编程库. |
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
@@ -349,6 +349,7 @@ Linux 一开始是在一台 i386 上的机器开发的, i386 的硬件页表是
|
||||
| 2022/11/15 | Sidhartha Kumar <sidhartha.kumar@oracle.com> | [convert core hugetlb functions to folios](https://patchwork.kernel.org/project/linux-mm/cover/20221115212217.19539-1-sidhartha.kumar@oracle.com/) | 695698 | v1 ☐☑ | [LORE v1,0/10](https://lore.kernel.org/r/20221115212217.19539-1-sidhartha.kumar@oracle.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/10](https://lore.kernel.org/r/20221117210258.12732-1-sidhartha.kumar@oracle.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/10](https://lore.kernel.org/r/20221117211501.17150-1-sidhartha.kumar@oracle.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/10](https://lore.kernel.org/r/20221118222002.82588-1-sidhartha.kumar@oracle.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/10](https://lore.kernel.org/r/20221129225039.82257-1-sidhartha.kumar@oracle.com) |
|
||||
| 2022/12/30 | Kefeng Wang <wangkefeng.wang@huawei.com> | [mm: convert page_idle/damon to use folios](https://patchwork.kernel.org/project/linux-mm/cover/20221230070849.63358-1-wangkefeng.wang@huawei.com/) | 707655 | v4 ☐☑ | [LORE v4,0/8](https://lore.kernel.org/r/20221230070849.63358-1-wangkefeng.wang@huawei.com) |
|
||||
| 2022/12/31 | Matthew Wilcox <willy@infradead.org> | [Get rid of first tail page fields](https://patchwork.kernel.org/project/linux-mm/cover/20221231214610.2800682-1-willy@infradead.org/) | 708076 | v1 ☐☑ | [LORE v1,0/22](https://lore.kernel.org/r/20221231214610.2800682-1-willy@infradead.org) |
|
||||
| 2023/03/17 | Ryan Roberts <ryan.roberts@arm.com> | [variable-order, large folios for anonymous memory](https://patchwork.kernel.org/project/linux-mm/cover/20230317105802.2634004-1-ryan.roberts@arm.com/) | 731151 | v1 ☐☑ | [LORE v1,0/6](https://lore.kernel.org/r/20230317105802.2634004-1-ryan.roberts@arm.com) |
|
||||
|
||||
|
||||
|
||||
@@ -651,7 +652,7 @@ Linux 进程使用不同的虚拟地址空间. 因此, 管理该地址空间状
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2023/02/11 | Matthew Wilcox <willy@infradead.org> | [New arch interfaces for manipulating multiple pages](https://patchwork.kernel.org/project/linux-mm/cover/20230211033948.891959-1-willy@infradead.org/) | 720910 | v1 ☐☑ | [LORE v1,0/7](https://lore.kernel.org/r/20230211033948.891959-1-willy@infradead.org)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/30](https://lore.kernel.org/r/20230227175741.71216-1-willy@infradead.org)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/34](https://lore.kernel.org/r/20230228213738.272178-1-willy@infradead.org) |
|
||||
| 2023/02/11 | Matthew Wilcox <willy@infradead.org> | [New page table range API](https://patchwork.kernel.org/project/linux-mm/cover/20230211033948.891959-1-willy@infradead.org/) | New arch interfaces for manipulating multiple pages | v1 ☐☑ | [LORE v1,0/7](https://lore.kernel.org/r/20230211033948.891959-1-willy@infradead.org)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/30](https://lore.kernel.org/r/20230227175741.71216-1-willy@infradead.org)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/34](https://lore.kernel.org/r/20230228213738.272178-1-willy@infradead.org)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/36](https://lore.kernel.org/r/20230315051444.3229621-1-willy@infradead.org) |
|
||||
|
||||
|
||||
|
||||
@@ -1743,13 +1744,15 @@ SLUB 在解决了上述的问题之上, 提供与 SLAB 完全一样的接口,
|
||||
|
||||
**2.6.16(2006 年 3 月发布)**
|
||||
|
||||
这是第三个对象分配器, 提供同样的接口, 它是为适用于嵌入式小内存小机器的环境而引入的, 所以实现上很精简, 大大减小了内存 footprint, 能在小机器上提供很不错的性能.
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2005/11/03 | Matt Mackall <mpm@selenic.com> | [slob: introduce the SLOB allocator](https://lore.kernel.org/patchwork/patch/45623) | 实现 SLOB 分配器 | v2 ☑ 2.6.16-rc1 | [PatchWork v2](https://lore.kernel.org/patchwork/patch/45623) |
|
||||
| 2021/10/18 | Matt Mackall <mpm@selenic.com> | [slob: add size header to all allocations](https://patchwork.kernel.org/project/linux-mm/patch/20211018033841.3027515-1-rkovhaev@gmail.com) | 在所有分配的 (PAGE_SIZE - align_offset) 和 less 前面加上 size 头. 这样, kfree() 和 kfree() 都可以释放 kmem_cache_alloc() 内存, 只要它们小于 (PAGE_SIZE - align_offset). 这个更改的主要原因是稍微简化了 SLOB, 使它在出现问题时更容易调试. | v1 ☐ | [PatchWork v2](https://patchwork.kernel.org/project/linux-mm/patch/20211018033841.3027515-1-rkovhaev@gmail.com)<br>*-*-*-*-*-*-*-*<br>[PatchWork v4](https://patchwork.kernel.org/project/linux-mm/patch/20211122013026.909933-1-rkovhaev@gmail.com) |
|
||||
| 2023/03/10 | Vlastimil Babka <vbabka@suse.cz> | [remove SLOB and allow kfree() with kmem_cache_alloc()](https://lore.kernel.org/all/20230310103210.22372-1-vbabka@suse.cz) | 不再推荐 SLOB 作为简单的分配器. SLOB 分配程序的设计目的是提高空间效率, 但却不具有可伸缩性. 参见 phoronix 报道 [Linux 6.4 Looking To Drop The SLOB Memory Allocator](https://www.phoronix.com/news/Linux-6.4-Looks-To-Drop-SLOB). | v1 ☐☑✓ | [LORE v1,0/7](https://lore.kernel.org/all/20230310103210.22372-1-vbabka@suse.cz) |
|
||||
|
||||
|
||||
这是第三个对象分配器, 提供同样的接口, 它是为适用于嵌入式小内存小机器的环境而引入的, 所以实现上很精简, 大大减小了内存 footprint, 能在小机器上提供很不错的性能.
|
||||
|
||||
### 2.3.4 SLQB
|
||||
-------
|
||||
@@ -3941,7 +3944,7 @@ v2.5 的时候引入了 shrink 机制, 并提供了 API 统一了各个模块的
|
||||
| 2018/07/03 | Kirill Tkhai <ktkhai@virtuozzo.com> | [Improve shrink_slab() scalability (old complexity was O(n^2), new is O(n))](https://lore.kernel.org/all/153063036670.1818.16010062622751502.stgit@localhost.localdomain/) | 降低 shrink_slab 的算法复杂度, 从 O(N^2) 降低到 O(N). | v8 ☑ 4.19-rc1 | [LORE v8,00/17](https://lore.kernel.org/all/153063036670.1818.16010062622751502.stgit@localhost.localdomain), [LORE v9,00/17](https://lore.kernel.org/all/153112469064.4097.2581798353485457328.stgit@localhost.localdomain) |
|
||||
| 2018/08/07 | Kirill Tkhai <ktkhai@virtuozzo.com> | [Introduce lockless shrink_slab()](https://patchwork.kernel.org/project/linux-mm/cover/153365347929.19074.12509495712735843805.stgit@localhost.localdomain) | NA | RFC ☐ | [LORE v8,00/17](https://patchwork.kernel.org/project/linux-mm/cover/153365347929.19074.12509495712735843805.stgit@localhost.localdomain) |
|
||||
| 2022/04/02 | Hillf Danton <hdanton@sina.com> | [[RFC] mm/vmscan: add periodic slab shrinker](https://patchwork.kernel.org/project/linux-mm/patch/20220402072103.5140-1-hdanton@sina.com/) | 当一个具有大量内存的系统在一个目录中有数百万个 negative dentries 时, 在添加 inotify watch 时可能[会发生 softlookup](https://lore.kernel.org/linux-fsdevel/20220209231406.187668-1-stephen.s.brennan@oracle.com). 为了解决这个问题可以添加独立于直接回收和后台回收运行的周期性(periodic) slab shrinker, 以回收已冷却 30 秒以上的 slab 对象. 向 shrink 控件添加 periodic flag, 让缓存所有者知道这是一个周期性收缩器, 它与以最低 recalim 优先级运行的常规 shrinker 相同, 并且可以在没有一次性对象的情况下随意执行任何操作. | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20220402072103.5140-1-hdanton@sina.com) |
|
||||
| 2023/02/20 | Qi Zheng <zhengqi.arch@bytedance.com> | [make slab shrink lockless](https://patchwork.kernel.org/project/linux-mm/cover/20230220091637.64865-1-zhengqi.arch@bytedance.com/) | 723376 | v1 ☐☑ | [LORE v1,0/5](https://lore.kernel.org/r/20230220091637.64865-1-zhengqi.arch@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/7](https://lore.kernel.org/r/20230223132725.11685-1-zhengqi.arch@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/8](https://lore.kernel.org/r/20230226144655.79778-1-zhengqi.arch@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/8](https://lore.kernel.org/all/20230307065605.58209-1-zhengqi.arch@bytedance.com) |
|
||||
| 2023/02/20 | Qi Zheng <zhengqi.arch@bytedance.com> | [make slab shrink lockless](https://patchwork.kernel.org/project/linux-mm/cover/20230220091637.64865-1-zhengqi.arch@bytedance.com/) | 723376 | v1 ☐☑ | [LORE v1,0/5](https://lore.kernel.org/r/20230220091637.64865-1-zhengqi.arch@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/7](https://lore.kernel.org/r/20230223132725.11685-1-zhengqi.arch@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/8](https://lore.kernel.org/r/20230226144655.79778-1-zhengqi.arch@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/8](https://lore.kernel.org/all/20230307065605.58209-1-zhengqi.arch@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/8](https://lore.kernel.org/r/20230313112819.38938-1-zhengqi.arch@bytedance.com) |
|
||||
|
||||
|
||||
### 4.3.3 THP Shrinker
|
||||
@@ -5054,7 +5057,7 @@ David Rientjes 率先提出了这种想法 [Hugepage collapse in process context
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2021/02/16 | David Rientjes <rientjes@google.com> | [Hugepage collapse in process context](https://lore.kernel.org/all/d098c392-273a-36a4-1a29-59731cdf5d3d@google.com) | 允许用户空间通过新的 process_madvise() 调用来诱导 HugePage Collapse | RFC,v1 ☐ | [LORE RFC v1,00/14](https://lore.kernel.org/all/d098c392-273a-36a4-1a29-59731cdf5d3d@google.com) |
|
||||
| 2022/06/04 | Zach O'Keefe <zokeefe@google.com> | [mm: userspace hugepage collapse](https://patchwork.kernel.org/project/linux-mm/cover/20220308213417.1407042-1-zokeefe@google.com/) | 这组补丁为用户空间提供了一种机制, 可以在进程上下文中将符合条件的内存范围压缩为 THP, 从而允许用户精细化地控制自己的 HugePages 使用策略. 借鉴了 David Rientjes 的想法. | v1 ☐☑ | [LORE v1,00/14](https://lore.kernel.org/r/20220308213417.1407042-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/12](https://lore.kernel.org/r/20220414180612.3844426-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/12](https://lore.kernel.org/r/20220426144412.742113-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/12](https://lore.kernel.org/r/20220502181714.3483177-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/12](https://lore.kernel.org/r/20220504214437.2850685-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v6,0/15](https://lore.kernel.org/r/20220604004004.954674-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v7,0/18](https://lore.kernel.org/r/20220706235936.2197195-1-zokeefe@google.com) |
|
||||
| 2022/06/04 | Zach O'Keefe <zokeefe@google.com> | [mm: userspace hugepage collapse](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=9d0d946840075e0268f4f77fe39ba0f53e84c7c4) | 这组补丁为用户空间提供了一种机制, 可以在进程上下文中将符合条件的内存范围压缩为 THP, 从而允许用户精细化地控制自己的 HugePages 使用策略. 借鉴了 David Rientjes 的想法. | v1 ☑ 6.1-rc1 | [LORE v1,00/14](https://lore.kernel.org/r/20220308213417.1407042-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/12](https://lore.kernel.org/r/20220414180612.3844426-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/12](https://lore.kernel.org/r/20220426144412.742113-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/12](https://lore.kernel.org/r/20220502181714.3483177-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/12](https://lore.kernel.org/r/20220504214437.2850685-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v6,0/15](https://lore.kernel.org/r/20220604004004.954674-1-zokeefe@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v7,0/18](https://lore.kernel.org/r/20220706235936.2197195-1-zokeefe@google.com) |
|
||||
|
||||
|
||||
* 其他
|
||||
@@ -6517,7 +6520,7 @@ Intel 的吴峰光 [PMEM NUMA node and hotness accounting/migration](https://lor
|
||||
| 2021/10/14 | Yang Shi <shy828301@gmail.com> | [mm: migrate: make demotion knob depend on migration](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=20f9ba4f995247bb79e243741b8fdddbd76dd923) | NA | v1 ☑✓ 5.16-rc1 | [LORE](https://lore.kernel.org/all/20211015005559.246709-1-shy828301@gmail.com), [COMMIT](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=20f9ba4f995247bb79e243741b8fdddbd76dd923) |
|
||||
| 2021/11/24 | Hasan Al Maruf <hasan3050@gmail.com> | [Transparent Page Placement for Tiered-Memory](https://patchwork.kernel.org/project/linux-mm/cover/cover.1637778851.git.hasanalmaruf@fb.com) | 由于不同类型的内存对性能的影响程度不同, 因此如何跨 NUMA 节点管理页面应该是一个值得关注的问题. Dave Hansen 的补丁集 ["Migrate Pages in replace of discard"](https://lwn.net/Articles/860215) 在回收过程中将顶级页面降级到慢级节点. 然而, 他的补丁集不包括将慢层内存节点上的页面提升到顶级内存节点的功能. 因此, 在慢层节点上降级或新分配的页面将经历 NUMA 延迟, 并损害应用程序性能. 在这个补丁集中,<br>1. 通过增强现有的 AutoNUMA 机制, 将页面从慢级节点提升到顶级节点.<br>2. 将顶级节点的回收和分配逻辑解耦, 以便回收在更高的水印处触发, 并将较冷的页面降级到慢层内存中. 因此, 顶级节点可以保留一些空闲空间, 以接受来自慢级节点的新分配和提升.<br> 在对页面升级期间, 添加滞后性, 只升级那些在短时间内不太可能被降级页面. 这减少了页面在短时间内频繁降级和提升而在 NUMA 节点之间来回跳转的机会. 作者在支持 cxl 的 DRAM 和 PMEM 层的系统上测试了这个补丁集. 可以将较热的页面转移到顶级节点, 而将较冷的页面移动到慢层节点, 从而产生大量的 Meta 生产工作负载和实时流量. 因此, 顶级节点提供更多的热页面, 应用程序的性能也得到了提高. 将 80% 的匿名者带到顶级节点. 慢层内存中的匿名页大多是冷页. 由于顶级节点不能承载所有热内存, 一些热文件仍然留在慢级节点上. 尽管如此, 远程 NUMA 读带宽从 80% 减少到 40%. 与服务于整个工作集的顶级节点的基线相比, 使用这个补丁集的吞吐量回归仅为 5%. 参见报道 [Facebook/Meta Tackling Transparent Page Placement For Tiered-Memory Linux Systems](https://www.phoronix.com/scan.php?page=news_item&px=Meta-Hot-Pages-High-Tiers). | v1 ☐ | [PatchWork 0/5]https://patchwork.kernel.org/project/linux-mm/cover/cover.1637778851.git.hasanalmaruf@fb.com) |
|
||||
| 2021/12/11 | Baolin Wang <baolin.wang@linux.alibaba.com> | [Add speculative numa fault support](https://lore.kernel.org/patchwork/patch/1479229) | 这个 RFC 补丁集为分级内存等场景添加了推测性的 numa 错误支持. 在分层内存系统上, 它将依靠 numa 平衡将慢内存和热内存提升为快内存, 以提高性能. 因此, 我们可以根据某些工作负载的数据局部性, 提前在低速内存中提升多个顺序页面, 以提高性能. 那么现在有多少页面需要提升到最快的内存是最好的? 现在这个 RFC 补丁集只实现了一个基本而简单的机制来推测每个 VMA 的 numa 故障窗口. 它将为每个 VMA 引入一个新的原子成员来记录 numa 故障窗口信息, 该信息用于确定它是扩展还是减少 numa 故障窗口的顺序流. 在分层内存系统中测试 mysql 可以看到大约 6% 的改进. 注意: 这个补丁集是[基于实现分级内存提升的补丁集 NUMA balancing: optimize page placement for memory tiering system](https://lore.kernel.org/lkml/87bl2gsnrd.fsf@yhuang6-desk2.ccr.corp.intel.com). 参见报道 [Speculative NUMA Fault Support Proposed For Improving Tiered Memory Linux Performance](https://www.phoronix.com/scan.php?page=news_item&px=Speculative-NUMA-Fault) | v1 ☐ | [LORE](https://lore.kernel.org/lkml/cover.1639306956.git.baolin.wang@linux.alibaba.com), [PatchWork](https://patchwork.kernel.org/project/linux-mm/cover/cover.1639306956.git.baolin.wang@linux.alibaba.com) |
|
||||
| 2022/07/13 | Huang Ying <ying.huang@intel.com> | [memory tiering: hot page selection](https://patchwork.kernel.org/project/linux-mm/cover/20220408071222.219689-1-ying.huang@intel.com/) | 在分级内存的系统中, 需要使用 NUMA 来优化页面在内存中的位置. 基本上, 最初的 NUMA Balancing 实现选择并提升最近访问最多 (mostly recently accessed/MRU) 的页面. 但最近访问的页面可能很冷. 因此, 在这个补丁集中, 我们基于 NUMA 平衡页表扫描和页面 Page Fault & Hint 之间的延迟实现了一个新的热页识别算法. 另外一方面热页升级可能会在系统中产生一些开销. 为了控制开销, 实现了一种简单的提升速率限制机制. 用于识别热页的热阈值通常取决于工作负载. 因此, 我们还实现了一个热页阈值自动调整算法. 基本思想是增加 / 减少热页阈值, 使通过热页阈值提升到快速内存的页面数接近速率限制. | v1 ☐☑ | [2022/04/08 LORE v1,0/3](https://lore.kernel.org/r/20220408071222.219689-1-ying.huang@intel.com)<br>*-*-*-*-*-*-*-* <br>[2022/06/22 LORE v1,0/3](https://lore.kernel.org/r/20220622083519.708236-1-ying.huang@intel.com)<br>*-*-*-*-*-*-*-* <br>[2022/07/13 LORE v1,0/3](https://lore.kernel.org/r/20220713083954.34196-1-ying.huang@intel.com) |
|
||||
| 2022/07/13 | Huang Ying <ying.huang@intel.com> | [memory tiering: hot page selection](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=c959924b0dc53bf6252793f41480bc01b9792570) | 在分级内存的系统中, 需要使用 NUMA 来优化页面在内存中的位置. 基本上, 最初的 NUMA Balancing 实现选择并提升最近访问最多 (mostly recently accessed/MRU) 的页面. 但最近访问的页面可能很冷. 因此, 在这个补丁集中, 我们基于 NUMA 平衡页表扫描和页面 Page Fault & Hint 之间的延迟实现了一个新的热页识别算法. 另外一方面热页升级可能会在系统中产生一些开销. 为了控制开销, 实现了一种简单的提升速率限制机制. 用于识别热页的热阈值通常取决于工作负载. 因此, 我们还实现了一个热页阈值自动调整算法. 基本思想是增加 / 减少热页阈值, 使通过热页阈值提升到快速内存的页面数接近速率限制. | v1 ☐☑ | [2022/04/08 LORE v1,0/3](https://lore.kernel.org/r/20220408071222.219689-1-ying.huang@intel.com)<br>*-*-*-*-*-*-*-* <br>[2022/06/22 LORE v1,0/3](https://lore.kernel.org/r/20220622083519.708236-1-ying.huang@intel.com)<br>*-*-*-*-*-*-*-* <br>[2022/07/13 LORE v1,0/3](https://lore.kernel.org/r/20220713083954.34196-1-ying.huang@intel.com) |
|
||||
| 2022/04/13 | Jagdish Gediya <jvgediya@linux.ibm.com> | [mm: demotion: Introduce new node state N_DEMOTION_TARGETS](https://patchwork.kernel.org/project/linux-mm/cover/20220413092206.73974-1-jvgediya@linux.ibm.com/) | 631805 | v2 ☐☑ | [LORE v2,0/5](https://lore.kernel.org/r/20220413092206.73974-1-jvgediya@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/7](https://lore.kernel.org/r/20220422195516.10769-1-jvgediya@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v1,0/3](https://lore.kernel.org/r/20220426085105.60822-1-ying.huang@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v1,0/3](https://lore.kernel.org/r/20220510063958.86985-1-ying.huang@intel.com) |
|
||||
| 2022/07/14 | Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> | [mm/demotion: Memory tiers and demotion](https://patchwork.kernel.org/project/linux-mm/cover/20220527122528.129445-1-aneesh.kumar@linux.ibm.com/) | 645595 | v4 ☐☑ | [LORE v4,0/7](https://lore.kernel.org/r/20220527122528.129445-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/9](https://lore.kernel.org/r/20220603134237.131362-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v6,0/13](https://lore.kernel.org/r/20220610135229.182859-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v7,0/12](https://lore.kernel.org/r/20220622082513.467538-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v9,0/8](https://lore.kernel.org/r/20220714045351.434957-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v10,0/8](https://lore.kernel.org/r/20220720025920.1373558-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v11,0/8](https://lore.kernel.org/r/20220728190436.858458-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v12,0/8](https://lore.kernel.org/r/20220729061349.968148-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v13,0/9](https://lore.kernel.org/r/20220808062601.836025-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v14,0/10](https://lore.kernel.org/r/20220812055710.357820-1-aneesh.kumar@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v15,0/10](https://lore.kernel.org/r/20220818131042.113280-1-aneesh.kumar@linux.ibm.com) |
|
||||
| 2022/06/06 | Aneesh Kumar K V <aneesh.kumar@linux.ibm.com> | [mm/demotion: Add sysfs ABI documentation](https://patchwork.kernel.org/project/linux-mm/patch/87r1428k9n.fsf@linux.ibm.com/) | 647508 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/87r1428k9n.fsf@linux.ibm.com) |
|
||||
@@ -7187,8 +7190,8 @@ CSDN 宣传博客 [内存不超过 5M, datop 在识别冷热内存及跨 numa
|
||||
| 2022/08/24 | CGEL <cgel.zte@gmail.com> | [ksm: count allocated rmap_items and update documentation](https://patchwork.kernel.org/project/linux-mm/cover/20220824040036.215002-1-xu.xin16@zte.com.cn/) | 670470 | v2 ☐☑ | [LORE v2,0/2](https://lore.kernel.org/r/20220824040036.215002-1-xu.xin16@zte.com.cn)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/2](https://lore.kernel.org/r/20220830143731.299702-1-xu.xin16@zte.com.cn) |
|
||||
| 2022/08/29 | Qi Zheng <zhengqi.arch@bytedance.com> | [add common struct mm_slot and use it in THP and KSM](https://patchwork.kernel.org/project/linux-mm/cover/20220829143055.41201-1-zhengqi.arch@bytedance.com) | 672053 | v1 ☐☑ | [LORE v1,0/7](https://lore.kernel.org/r/20220829143055.41201-1-zhengqi.arch@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/7](https://lore.kernel.org/r/20220831031951.43152-1-zhengqi.arch@bytedance.com) |
|
||||
| 2022/10/08 | xu.xin.sc@gmail.com <xu.xin.sc@gmail.com> | [ksm: support tracking KSM-placed zero-pages](https://lore.kernel.org/all/20221008070156.308465-1-xu.xin16@zte.com.cn) | 在使能 use_zero_pages 之前, ksm 的 pages_sharing 基本是准确的. 但是当启用 use_zero_pages 时, 所有与内核零页合并的空页都不会计算在 pages_sharing 或 pages_shared 中. 这是因为这些空页面被合并为零页面, KSM 不再管理这些页面, 这至少会导致两个问题: 1. MADV_UNMERGEABLE 和其他触发取消共享的方法将不会取消 KSM 放置的共享零页(这至少是违反 MADV_UNMERGEABLE 文档的), 参见[链接](https://lore.kernel.org/lkml/4a3daba6-18f9-d252-697c-197f65578c44@redhat.com). 2. 当启用 use_zero_pages 时, 我们无法知道有多少页是 KSM 放置的零页, 这导致 KSM 对所有实际合并的页面不透明. 通过这个补丁集我们可以精确地取消共享零页 (ksm - 放置) 并计算 ksm 零页. | v1 ☐☑✓ | [2022/10/08 LORE v1,0/5](https://lore.kernel.org/all/20221008070156.308465-1-xu.xin16@zte.com.cn)<br>*-*-*-*-*-*-*-* <br>[2022/10/11 LORE v3,0/5](https://lore.kernel.org/all/20221011022006.322158-1-xu.xin16@zte.com.cn)<br>*-*-*-*-*-*-*-* <br>[2022/12/26 LORE v4,0/6](https://lore.kernel.org/r/202212260959492929897@zte.com.cn)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/6](https://lore.kernel.org/r/202212300911327101708@zte.com.cn) |
|
||||
| 2023/01/23 | Stefan Roesch <shr@devkernel.io> | [mm: process/cgroup ksm support](https://patchwork.kernel.org/project/linux-mm/cover/20230123173748.1734238-1-shr@devkernel.io/) | 到目前为止, KSM 只能通过为内存区域调用 madvise 来启用. 这组补丁允许在进程 / cgroup 级别启用 / 禁用 KSM. | v1 ☐☑ | [LORE v1,0/20](https://lore.kernel.org/r/20230123173748.1734238-1-shr@devkernel.io)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/19](https://lore.kernel.org/r/20230210215023.2740545-1-shr@devkernel.io)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/3](https://lore.kernel.org/r/20230224044000.3084046-1-shr@devkernel.io)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/3](https://lore.kernel.org/all/20230310182851.2579138-1-shr@devkernel.io) |
|
||||
| 2023/02/10 | Stefan Roesch <shr@devkernel.io> | [[v1] mm: add tracepoints to ksm](https://patchwork.kernel.org/project/linux-mm/patch/20230210214645.2720847-1-shr@devkernel.io/) | 720845 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20230210214645.2720847-1-shr@devkernel.io) |
|
||||
| 2023/04/06 | Stefan Roesch <shr@devkernel.io> | [mm: process/cgroup ksm support](https://patchwork.kernel.org/project/linux-mm/cover/20230123173748.1734238-1-shr@devkernel.io/) | 到目前为止, KSM 只能通过为内存区域调用 madvise 来启用. 这组补丁允许在进程 / cgroup 级别启用/禁用 KSM. 参见 [Process-level kernel samepage merging control](https://lwn.net/Articles/928510) | v1 ☐☑ | [LORE v1,0/20](https://lore.kernel.org/r/20230123173748.1734238-1-shr@devkernel.io)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/19](https://lore.kernel.org/r/20230210215023.2740545-1-shr@devkernel.io)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/3](https://lore.kernel.org/r/20230224044000.3084046-1-shr@devkernel.io)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/3](https://lore.kernel.org/all/20230310182851.2579138-1-shr@devkernel.io)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/3](http://lore.kernel.org/all/20230406165339.1017597-1-shr@devkernel.io) |
|
||||
| 2023/02/10 | Stefan Roesch <shr@devkernel.io> | [[v1] mm: add tracepoints to ksm](https://patchwork.kernel.org/project/linux-mm/patch/20230210214645.2720847-1-shr@devkernel.io/) | 720845 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20230210214645.2720847-1-shr@devkernel.io)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/1](https://lore.kernel.org/r/20230313204606.3581988-1-shr@devkernel.io) |
|
||||
| 2023/02/27 | Stefan Roesch <shr@devkernel.io> | [[v1] prctl: add flags to enable KSM at the process level](https://patchwork.kernel.org/project/linux-mm/patch/20230227220206.436662-1-shr@devkernel.io/) | 725338 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20230227220206.436662-1-shr@devkernel.io) |
|
||||
|
||||
|
||||
@@ -7380,7 +7383,7 @@ OS 判断如果是在用户态触发这个硬件内存错误时, 处理方式是
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:-----:|:----:|:----:|:----:|:------------:|:----:|
|
||||
| 2022/01/30 | Edgecombe, Rick P <rick.p.edgecombe@intel.com> | [Shadow stacks for userspace](https://patchwork.kernel.org/project/linux-mm/cover/20220130211838.8382-1-rick.p.edgecombe@intel.com) | 609893 | v1 ☐☑ | [PatchWork v1,0/35](https://lore.kernel.org/r/20220130211838.8382-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/39](https://lore.kernel.org/r/20220929222936.14584-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/37](https://lore.kernel.org/r/20221104223604.29615-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/39](https://lore.kernel.org/r/20221203003606.6838-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/39](https://lore.kernel.org/r/20230119212317.8324-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v6,0/41](https://lore.kernel.org/r/20230218211433.26859-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v7,0/41](https://lore.kernel.org/r/20230227222957.24501-1-rick.p.edgecombe@intel.com) |
|
||||
| 2022/01/30 | Edgecombe, Rick P <rick.p.edgecombe@intel.com> | [Shadow stacks for userspace](https://patchwork.kernel.org/project/linux-mm/cover/20220130211838.8382-1-rick.p.edgecombe@intel.com) | [User-space shadow stacks (maybe) for 6.4](https://lwn.net/Articles/926649). | v1 ☐☑ | [PatchWork v1,0/35](https://lore.kernel.org/r/20220130211838.8382-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/39](https://lore.kernel.org/r/20220929222936.14584-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/37](https://lore.kernel.org/r/20221104223604.29615-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/39](https://lore.kernel.org/r/20221203003606.6838-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/39](https://lore.kernel.org/r/20230119212317.8324-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v6,0/41](https://lore.kernel.org/r/20230218211433.26859-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v7,0/41](https://lore.kernel.org/r/20230227222957.24501-1-rick.p.edgecombe@intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v8,0/40](https://lore.kernel.org/r/20230319001535.23210-1-rick.p.edgecombe@intel.com) |
|
||||
|
||||
|
||||
|
||||
@@ -7433,11 +7436,22 @@ OS 判断如果是在用户态触发这个硬件内存错误时, 处理方式是
|
||||
## 14.11 unaccepted memory
|
||||
-------
|
||||
|
||||
[Seeking an acceptable unaccepted memory policy](https://lwn.net/Articles/928328)
|
||||
|
||||
通常, 当操作系统内核启动时, 它会发现可用内存并愉快地设置自己以使用该内存. 但是, UEFI 规范的 2.9 版添加了不可接受内存 (unaccepted memory) 的概念; 使用此机制时, 系统 (通常是虚拟化来宾) 将启动, 其内存处于不可接受状态. 在明确接受内存之前, 该系统将无法使用提供的内存. 在此类系统上, 引导加载程序通常会预先接受足够的内存以允许来宾内核引导; 该内核在使用之前必须负责接受其余部分.
|
||||
|
||||
| 优势 | 描述 |
|
||||
|:---:|:----:|
|
||||
| 加速开启 TDX/SEV-SNP 后虚拟机的启动. | SEV-SNP 和英特尔 TDX 等安全访客环境可以通过加密、反向映射表等方式保护其内存内容免受主机和其他访客的影响. 但是, 设置该保护需要一些时间, 这会大大减慢启动过程. 显式接受步骤允许操作系统随时间推移内存初始化. 如果仅在需要时以块形式接受内存, 则系统将更快地启动到运行状态. 来自 Kirill Shutemov 的添加未接受内存支持的补丁利用了这一点, 将内存的接受推迟到需要时才接受. |
|
||||
| 显式接受有助于保护安全的来宾免受恶意虚拟机监控程序的侵害 | 这些虚拟机监控程序可能会尝试在后台使用来宾的内存玩游戏. 如果虚拟机监控程序尝试将新页面潜入来宾的地址空间, 则来宾将不接受该新内存, 并且尝试访问它将生成错误. |
|
||||
|
||||
每个供应商的安全环境都有自己的管理验收过程的方法, 因此实现验收的一些代码必须特定于一个子体系结构. Shutemov 的补丁增加了对英特尔 TDX 的支持, 但对 AMD 的 SEV-SNP 的支持来自 Tom Lendacky 的单独补丁集.
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2021/08/10 | Anthony Yznaga <anthony.yznaga@oracle.com> | [x86: Impplement support for unaccepted memory](https://patchwork.kernel.org/project/linux-mm/cover/20210810062626.1012-1-kirill.shutemov@linux.intel.com) | UEFI 规范 v2.9 引入了内存接受的概念, 一些虚拟机平台, 如 Intel TDX 或 AMD SEV-SNP, 要求在来宾使用内存之前先接受内存, 并通过特定于虚拟机平台的协议进行接受.<br> 接受内存成本很高, 这会使 VMM 为接受的来宾物理地址范围分配内存, 最好等到需要使用内存时再接受内存, 这可以减少启动时间并减少内存开销.<br> 支持这种内存需要对核心 mm 代码进行少量更改:<br>1. memblock 必须在分配时接受内存;<br>2. 页面分配器必须在第一次分配页面时接受内存;<br>3. Memblock 更改是微不足道的.<br>4. 页面分配器被修改为在第一次分配时接受页面.<br>5. PageOffline() 用于指示页面需要接受.<br>6. 热插拔和引出序号当前使用的标志, 这样的页面对页面分配器不可用.<br> 如果一个体系结构想要支持不可接受的内存, 它必须提供三个助手:<br>1. accept_memory() 使一系列物理地址被接受;<br>2. 如果页面需要接受, 则通过 maybe_set_page_offline() 将页面标记为 PageOffline(), 在引导期间用于将页面放在空闲列表上.<br>3. clear_page_offline() 清除使页面被接受并清除 PageOffline(). | v1 ☐ | [PatchWork 0/5](https://patchwork.kernel.org/project/linux-mm/cover/20210810062626.1012-1-kirill.shutemov@linux.intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v1,00/12](https://lore.kernel.org/r/20220425033934.68551-1-kirill.shutemov@linux.intel.com) |
|
||||
| 2022/12/07 | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | [mm, x86/cc: Implement support for unaccepted memory](https://patchwork.kernel.org/project/linux-mm/cover/20221207014933.8435-1-kirill.shutemov@linux.intel.com/) | 702371 | v1 ☐☑ | [LORE v1,0/14](https://lore.kernel.org/r/20221207014933.8435-1-kirill.shutemov@linux.intel.com) |
|
||||
| 2023/03/30 | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | [mm, x86/cc: Implement support for unaccepted memory](https://patchwork.kernel.org/project/linux-mm/cover/20221207014933.8435-1-kirill.shutemov@linux.intel.com/) | Intel TDX 至此 unaccepted memory. | v1 ☐☑ | [LORE v1,0/14](https://lore.kernel.org/r/20221207014933.8435-1-kirill.shutemov@linux.intel.com)<br>*-*-*-*-*-*-*-* <br>[LORE v9,0/14](https://lore.kernel.org/all/20230330114956.20342-1-kirill.shutemov@linux.intel.com) |
|
||||
| 2023/04/04 | Tom Lendacky <thomas.lendacky@amd.com> | [Provide SEV-SNP support for unaccepted memory](https://lore.kernel.org/all/cover.1680628986.git.thomas.lendacky@amd.com) | AMD SEV-SNP 支持 unaccepted memory. | v9 ☐☑✓ | [LORE v7,0/6](https://lore.kernel.org/all/cover.1680628986.git.thomas.lendacky@amd.com) |
|
||||
|
||||
|
||||
## 14.12 USERCOPY
|
||||
|
||||
@@ -1253,6 +1253,7 @@ enqueue_task()
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:---:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2022/07/13 | Chengming Zhou <zhouchengming@bytedance.com> | [sched: task load tracking optimization and cleanup](https://lore.kernel.org/all/20220713040430.25778-1-zhouchengming@bytedance.com) | TODO | v2 ☐☑✓ | [LORE v1,0/8](https://lore.kernel.org/lkml/20220709151353.32883-1-zhouchengming@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/10](https://lore.kernel.org/all/20220713040430.25778-1-zhouchengming@bytedance.com) |
|
||||
| 2023/03/27 | Aaron Lu <aaron.lu@intel.com> | [sched/fair: Make tg->load_avg per node](https://lore.kernel.org/all/20230327053955.GA570404@ziqianlu-desk2) | 使用 sysbench 在一个 docker 实例中对 Postgres 进行基准测试, 并将 sysbench 的 nr_threads 设置为 nr_cpu 时, 可以观察到 update_cfs_group() 和 update_load_avg() 在一个 2sockets/112core/224cpu 的 Intel Sapphire Rapids 节点上显示了明显的 cpu 开销(10% 和 7.8%), 而在另一个节点的 cpu 的热点通常较低(4% 和 3%). 分析发现热点主要是访问 tg->load_avg, 其中 update_load_avg() 是写端, update_cfs_group() 是读端.<br>为什么只有一个节点的 CPU 有更大的开销, 原因是: task_group 是根据需要从 slab 分配的, 无论哪个 CPU 进行分配, 分配的 tg 将位于该节点上, 访问 tg->load_avg 将对同一节点上的 CPU 有更低的成本, 而对远程节点的 CPU 有更高的成本.<br>Tim Chen 告诉我, PeterZ 曾经提到过一种解决类似问题的方法, 即为每个节点设置一个计数器, 所以对 tg->load_avg 也做同样的事情.<br>优化后, 这两个节点上运行 5 分钟所看到的最坏的情况占比也才 2%.<br>针对这个工作负载有另外一个发现: 这个工作负载存在有很多唤醒时的任务迁移, 这就是为什么 update_load_avg() 和 update_cfs_group() 显示出明显的成本. 在 N 个实例中运行这个工作负载, 其中 N >= 2, sysbench 的 nr_threads 设置为 1/N nr_cpu, 在唤醒时间上的任务迁移大大减少, 上面提到的两个函数的开销也下降了很多. | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20230327053955.GA570404@ziqianlu-desk2) |
|
||||
|
||||
|
||||
# 4 基于调度域的负载均衡
|
||||
@@ -1847,6 +1848,7 @@ load_balance()
|
||||
| 2019/10/22 | | [sched/fair: fix rework of find_idlest_group()](https://lore.kernel.org/patchwork/patch/1143049) | fix 补丁 | | |
|
||||
| 2019/11/29 | | [sched/cfs: fix spurious active migration](https://lore.kernel.org/patchwork/patch/1160934) | fix 补丁 | | |
|
||||
| 2020/11/02 | Vincent Guittot <vincent.guittot@linaro.org> | [sched/fair: ensure tasks spreading in LLC during LB](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=16b0a7a1a0af9db6e008fecd195fe4d6cb366d83) | 之前的重构导致 schbench 延迟增加 95% 以上, 因此将 load_balance 的行为与唤醒路径保持一致, 尝试为任务选择一个同属于 LLC 的空闲 CPU. 从而在空闲 CPU 上更好地分散任务. | v1 ☑✓ 5.10-rc4 | [LORE](https://lore.kernel.org/all/20201102102457.28808-1-vincent.guittot@linaro.org) |
|
||||
| 2023/01/31 | Xi Wang <xii@google.com> | [sched: Consider capacity for certain load balancing decisions](https://lore.kernel.org/all/20230201012032.2874481-1-xii@google.com) | 在将负载平衡划分为不同的场景后, 对于 "migrate_task" 情况, CPU Capacity 被忽略, 这意味着线程可以在更长的时间内停留在 softirq 高负载 CPU 上. 通过比较 nr_running/capacity 而不是 nr_running, 可以将 CPU Capacity 重新添加到 "migrate_task" 决策中. 这有利于在网络流量大的机器上运行的工作负载. 这一变化不太可能对其他工作负载造成严重问题, 但可能仍然需要考虑一些极端情况. | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20230201012032.2874481-1-xii@google.com) |
|
||||
|
||||
|
||||
CPU 负载均衡器在不同的域之间进行平衡, 以分散负载, 并努力在所有域之间保持平衡. 同时期望相互之间有通信的任务可以迁移到接近的拓扑上, 以便于通信的时延最小. 但是这些决策是独立的. 因此在负载较轻的 NUMA 机器上, 两个在唤醒时本来应该拉在一起的通信任务可以被负载平衡器推开.
|
||||
@@ -2521,7 +2523,7 @@ Peter 将 sched/numa 的整体思路上也做了不断的调整和改动, 也开
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:---:|:----------:|:----:|
|
||||
| 2021/10/27 | Gang Li <ligang.bdlg@bytedance.com> | [sched/numa: add per-process numa_balancing](https://lkml.org/lkml/2021/10/27/517) | 这个补丁在 prctl 中添加了一个新的 api PR_NUMA_BALANCING 来控制当个进程参与和禁止 numa_balancing. 在执行 numa_balancing 时, 大量的页面错误会导致性能损失. 因此, 那些关心最坏情况下性能的进程需要禁用 numa_balancing. 相反, 另一些则允许暂时的性能损失以换取更高的平均性能, 因此启用 numa 平衡对它们来说更好. 但是当前 numa balancing 只能由 `/proc/sys/kernel/numa_balancing` 全局控制. 因此这个特性希望禁用 / 启用每个进程的 numa_balancing. 在 mm_struct 下添加 numa_balancing. 然后在 task_tick_numa 中使用来控制. mm ->numa_balancing 仅在全局 numa_balancing 启用时有效. 当全局 numa_balancing 被禁用时, mm->numa_blancing 不会改变, 当你想要获得进程 numa_balancing 状态时, 你总是会得到 0, 并且当你使用 prctl set 它时, 内核将返回 err. | v1 ☐ | [LKML](https://lkml.org/lkml/2021/10/27/517)<br>*-*-*-*-*-*-*-* <br>[LORE v1,0/1](https://lore.kernel.org/r/20220224075227.27127-1-ligang.bdlg@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[2022/09/29 LORE v4](https://lore.kernel.org/all/20220929064359.46932-1-ligang.bdlg@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[2022/10/27 LORE v5,0/2](https://lore.kernel.org/all/20221027025302.45766-1-ligang.bdlg@bytedance.com) |
|
||||
| 2021/10/27 | Gang Li <ligang.bdlg@bytedance.com> | [sched/numa: add per-process numa_balancing](https://lkml.org/lkml/2021/10/27/517) | 这个补丁在 prctl 中添加了一个新的 api PR_NUMA_BALANCING 来控制当个进程参与和禁止 numa_balancing. 在执行 numa_balancing 时, 大量的页面错误会导致性能损失. 因此, 那些关心最坏情况下性能的进程需要禁用 numa_balancing. 相反, 另一些则允许暂时的性能损失以换取更高的平均性能, 因此启用 numa 平衡对它们来说更好. 但是当前 numa balancing 只能由 `/proc/sys/kernel/numa_balancing` 全局控制. 因此这个特性希望禁用 / 启用每个进程的 numa_balancing. 在 mm_struct 下添加 numa_balancing. 然后在 task_tick_numa 中使用来控制. mm ->numa_balancing 仅在全局 numa_balancing 启用时有效. 当全局 numa_balancing 被禁用时, mm->numa_blancing 不会改变, 当你想要获得进程 numa_balancing 状态时, 你总是会得到 0, 并且当你使用 prctl set 它时, 内核将返回 err. | v1 ☐ | [LKML](https://lkml.org/lkml/2021/10/27/517)<br>*-*-*-*-*-*-*-* <br>[LORE v1,0/1](https://lore.kernel.org/r/20220224075227.27127-1-ligang.bdlg@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[2022/09/29 LORE v4](https://lore.kernel.org/all/20220929064359.46932-1-ligang.bdlg@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[2022/10/27 LORE v5,0/2](https://lore.kernel.org/all/20221027025302.45766-1-ligang.bdlg@bytedance.com)<br>*-*-*-*-*-*-*-* <br>[2023/04/13 LORE v6,0/2](https://lore.kernel.org/all/20230412140701.58337-1-ligang.bdlg@bytedance.com) |
|
||||
| 2014/05/14 | Rik van Riel <riel@redhat.com> | [sched/numa: Allow task switch if load imbalance improves](https://linuxplumbersconf.org/event/4/contributions/480) | 目前 NUMA 平衡代码只允许在 NUMA 节点上的负载处于平衡状态时在 NUMA 节点之间移动任务. 当负载开始不平衡时, 它就崩溃了. 因此这个补丁引入 load_too_imbalanced() 来判定, 如果不平衡较小, 或者新的不平衡小于原来的不平衡, 则允许在 NUMA 节点之间移动任务. | v1 ☑ 3.16-rc1 | [COMMIT](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e63da03639cc9e6e83b62e7ef8ffdbb92421416a) |
|
||||
| 2018/09/21 | Srikar Dronamraju <srikar@linux.vnet.ibm.com> | [sched/numa: Avoid task migration for small NUMA improvement](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6fd98e775f24fd41520928d345f5db3ff52bb35d) | 如果 NUMAC 层次的任务迁移带来的改进非常小(小于 SMALLIMP), 那么应该尽量避免任务迁移. 否则可能会带来 pingpong(进程来回迁移颠簸), 甚至 cache-miss 引起的性能下降. | v1 ☑ 4.19-rc7 | [COMMIT](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6fd98e775f24fd41520928d345f5db3ff52bb35d) |
|
||||
|
||||
@@ -3291,11 +3293,26 @@ v4.13 引入 NUMA WAKE AFFINE 的时候测试发现, CPU 的空闲造成了 NAS
|
||||
### 4.6.6 硬件辅助 NUMA FAULT
|
||||
-------
|
||||
|
||||
| 论文 | 描述 | 实现 |
|
||||
|:---:|:----:|:----:|
|
||||
| [Traffic management: a holistic approach to memory placement on NUMA systems, ASPLOS 2013](https://dl.acm.org/doi/10.1145/2451116.2451157)| Carrefour 方案, 通过 AMD IBS 采样内存访问信息, 优化页面迁移. 减少不必要的迁移. | [Carrefour](https://github.com/Carrefour) |
|
||||
| [Large pages may be harmful on NUMA systems](https://dl.acm.org/doi/10.5555/2643634.2643659)<br>[Large Pages May Be Harmful on NUMA Systems](https://www.usenix.org/sites/default/files/conference/protected-files/atc14_slides_gaud.pdf) | 传统的 NUMA Balancing 在大页的场景遇到了两个问题: 热页效应( hot-page effect)和页面伪共享(page-level false sharing), 这不能通过页面迁移来解决. 为了解决这些问题, 论文提出了 Carrefour-LP: 对支持 NUMA 的页面放置算法 Carrefour 的大页面扩展. | NA |
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:----:|:----:|:---:|:---:|:----------:|:----:|
|
||||
| 2023/02/08 | Bharata B Rao <bharata@amd.com> | [Memory access profiler(IBS) driven NUMA balancing](https://lore.kernel.org/all/20230208073533.715-1-bharata@amd.com) | 一些硬件平台可以提供有关内存访问的信息, 这些信息可用于在 NUMA 系统上进行最佳页面和任务放置. AMD 处理器有一个称为基于指令的采样 (IBS) 的硬件设施, 可用于收集与指令获取和执行活动相关的特定度量. 此工具可用于基于统计采样执行内存访问分析. 这组补丁实现了基于硬件获得的访问信息进行驱动 NUMA 平衡. 这样, 就不再需要周期性地扫描地址空间并引入 NUMA FAULT 来构建任务到页面的访问关联. 因此, 这里采用的方法是用硬件提供的访问信息替换地址空间扫描加提示错误. 从硬件获得的访问样本作为 NUMA FAULT 的等价信息被反馈到 NUMA BALANCING. NUMA BALANCING 逻辑的其余部分 (收集 / 聚合共享 / 私有 / 本地 / 远程故障并根据故障执行页面 / 任务迁移) 将保留, 但访问替换故障除外. | v1 ☐☑✓ | [LORE v1,0/5](https://lore.kernel.org/all/20230208073533.715-1-bharata@amd.com) |
|
||||
|
||||
|
||||
### 4.6.7 学术研究
|
||||
-------
|
||||
|
||||
| 论文 | 描述 | 实现 |
|
||||
|:---:|:----:|:----:|
|
||||
| [Thread and memory placement on NUMA systems: asymmetry matters, ATC 2015](https://dl.acm.org/doi/10.5555/2813767.2813788) | Asymsched 方案, NUMA Balancing 的时候, 不仅考虑 NUMA Distance 还考虑节点之间的互联方式 <br> 比如当节点通过不同带宽的链路连接时, 不仅要考虑线程和数据是放在相同还是不同的节点上, 还要考虑这些节点是如何连接的. | [paper](https://www.usenix.org/system/files/conference/atc15/atc15-paper-lepers.pdf), [slide](https://www.usenix.org/sites/default/files/conference/protected-files/atc15_slides_lepers.pdf) |
|
||||
| [Communication-aware process and thread mapping using online communication detection](https://dl.acm.org/doi/10.1016/j.parco.2015.01.005) | 提出了 CDSM, 共享内存中的通信检测, 从页面错误中检测通信并使用此信息来执行映射(重点关注页面迁移)的机制. CDSM 在并行应用程序执行期间在操作系统级别工作, 并支持使用共享内存进行通信的所有并行化模型. 它不需要修改应用程序、以前了解其行为或更改硬件和运行时库. | [matthiasdiener/cdsm](https://github.com/matthiasdiener/cdsm) |
|
||||
| [kMAF: Automatic kernel-level management of thread and data affinity](https://ieeexplore.ieee.org/document/7855906)<br>[Kernel-Based Thread and Data Mapping for Improved Memory Affinity](https://dl.acm.org/doi/10.1109/TPDS.2015.2504985) | 提出 kMAF, 内核中自动管理线程和数据亲和性的机制. 正在运行的应用程序的内存访问行为在其执行期间通过分析其页面错误来确定. kMAF 使用此信息迁移线程和内存页, 从而优化整体内存访问局部性. | [matthiasdiener/kmaf](https://github.com/matthiasdiener/kmaf) |
|
||||
|
||||
|
||||
## 4.7 WAKEUP
|
||||
-------
|
||||
|
||||
@@ -3730,6 +3747,11 @@ Oracle 数据库具有类似的虚拟化功能, 称为 Oracle Multitenant, 其
|
||||
|:----:|:----:|:---:|:---:|:----------:|:----:|
|
||||
| 2015/03/18 | Steven Rostedt <rostedt@goodmis.org> | [sched/rt: Use IPI to trigger RT task push migration instead of pulling](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=b6366f048e0caff28af5335b7af2031266e1b06b) | 引入 RT_PUSH_IPI sched features, IPI 被发送到过载的 CPU 以进行被动的任务 PUSH. 在尝试触发 PULL 操作时, 默认不再执行 PULL, 而是依次通过 IPI 通知过载的 CPU(rtp_mask) PUSH 主动将任务出来.<br>1. 通常只向第一个过载的 CPU 发送一个 IPI. 它尝试推送它可以执行的任何任务, 然后查找下一个可以推送到 lowest CPU 的过载 CPU. 当所有过载的 CPU(其具有优先级大于 lowest CPU 的 pushable 任务)被覆盖时, IPI 停止.<br>2. 如果 lowest CPU 再次降低其优先级, 则设置一个标志, 告知 IPI 遍历在源 CPU 之后重新启动第一个 RT 过载 CPU.<br> 当 RT_PUSH_IPI 未启用时, 将实现获取 rq 锁并由 PULL CPU 主动从过载的 CPU PULL 任务出来执行的旧流程. 这用来解决极端场景下的 RQ 锁竞争问题. 通过将非过载 (比如空闲) 的 CPU 主动 PULL 的操作, 替换为过载任务被动串行的 PUSH 的操作, 减缓 RQ 锁冲突. | v5 ☑✓ 4.1-rc1 | [LORE](https://lore.kernel.org/all/20150318144946.2f3cc982@gandalf.local.home) |
|
||||
|
||||
## 4.10 其他 Load Balancing 优化
|
||||
-------
|
||||
|
||||
|
||||
| 2023/04/11 | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | [sched: Rate limit migrations](https://lore.kernel.org/all/20230411214116.361016-1-mathieu.desnoyers@efficios.com) | 将每个任务的迁移限制为每 SCHED_MIGRATION_WINDOW_NS(10ms) 窗口 SCHED_MIGRATION_LIMIT(32) 次. 具体的迁移计数和窗口大小可以通过 `kernel/sched/sched.h` 中的以下定义进行更改. | v1 ☐☑✓ | [LORE v1,0/1](https://lore.kernel.org/all/20230411214116.361016-1-mathieu.desnoyers@efficios.com) |
|
||||
|
||||
|
||||
# 5 select_task_rq
|
||||
@@ -3942,6 +3964,7 @@ y = (1 - \frac{pct^{2}}{10000^{2}} \times x^{2}) \times llc\_weight
|
||||
| 2021/06/15 | Peter Zijlstra | [Represent cluster topology and enable load balance between clusters](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=66558b730f2533cc2bf2b74d51f5f80b81e2bad0) | 第一个系列(series): 让拓扑域感知 cluster 的存在, 在 sysfs 接口中提供 cluster 的信息(包括 id 和 cpumask 等), 并添加 CONFIG_SCHED_CLUSTER, 可以在 cluster 之间实现负载平衡, 从而使大量工作负载受益. 测试表明, 在 Jacobsville 上增加 25.1% 的 SPECrate mcf, 在 kunpeng920 上增加 13.574% 的 mcf. 但是社区测试在 alder lake 上造成了一定的性能回归, [Linux 5.16's New Cluster Scheduling Is Causing Regression, Further Hurting Alder Lake](https://www.phoronix.com/scan.php?page=article&item=linux-516-regress&num=1), [Windows 11 Better Than Linux Right Now For Intel Alder Lake Performance](https://www.phoronix.com/scan.php?page=article&item=alderlake-windows-linux&num=1) | RFC ☑ [5.16-rc1](https://kernelnewbies.org/Linux_5.16#Add_cluster_scheduler_support_to_the_task_scheduler) | [2021/09/20 PatchWork 0/3](https://patchwork.kernel.org/project/linux-arm-kernel/cover/20210820013008.12881-1-21cnbao@gmail.com), [2021/09/20 PatchWork RESEND,0/3](https://patchwork.kernel.org/project/linux-arm-kernel/cover/20210924085104.44806-1-21cnbao@gmail.com), [LKML](https://lkml.org/lkml/2021/9/24/178), [LWN](https://lwn.net/Articles/866914), [GIT PULL, 5.16-rc1](https://lore.kernel.org/lkml/163572864855.3357115.17938524897008353101.tglx@xen13/) |
|
||||
| 2021/12/03 | Tim Chen <tim.c.chen@linux.intel.com> | [Make Cluster Scheduling Configurable](https://lkml.org/lkml/2021/12/3/891) | Cluster Scheduling 并不适用于所有场景, 因此这组补丁支持了在运行时和引导时可以动态配置 Cluster Scheduling. 可以通过启动参数 `sched_cluster={1|0}` 来在启动时开启和关闭, 也可以通过 `/proc/sys/kernel/sched_cluster` 接口在运行时动态开启和关闭.<br> 当系统负载适中时, 值得做额外的负载平衡来平衡 cluster 之间的负载, 以减少 cluster 内资源的争用. 但是如果系统负载较大, 各个资源已经得到充分利用, cluster 之间的负载平衡不太可能有助于减少 cluster 的资源争用, 因为 cluster 内已经完全繁忙.<br> 同时由于不感知性能异构的 CPU 类型, 造成了 Intel Alder Lake CPU 上性能退化, 参见 [Linux 5.16's New Cluster Scheduling Is Causing Regression, Further Hurting Alder Lake](https://www.phoronix.com/scan.php?page=article&item=linux-516-regress&num=3). 因此在 x86 hybrid 类型的 CPU 上禁用 Cluster Scheduling.<br> 在一个有 24 个 Atom 内核的 Jacobsville 系统上 (每个 cluster 有 4 个 Atom CPU 核共享一个 L2), 在 24 个 CPU 的系统上运行 mcf 基准测试, 从非常低的负载 1 个基准测试副本到 24 个基准测试副本. 我们看到, 在中等负载时吞吐量得到了提高, 但当系统满负载时, Cluster Scheduling 几乎没有什么提升.<br> 不过 Peter 最终直接选择在 x86 hybrid CPUs 上禁用 cluster. 参见 commit [cabdc3a8475b ("sched,x86: Don't use cluster topology for x86 hybrid CPUs")](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cabdc3a8475b918e55744f43719b26a82dc8fa6b). | v1 ☐ | [LORE 0/5](https://lkml.kernel.org/lkml/cover.1638563225.git.tim.c.chen@linux.intel.com), [Peter Zijlstra COMMIT](https://lore.kernel.org/all/163899885798.11128.4032422680527135079.tip-bot2@tip-bot2) |
|
||||
| 2022/01/26 | Yicong Yang <yangyicong@hisilicon.com> | [sched/fair: Scan cluster before scanning LLC in wake-up path](https://lore.kernel.org/all/20220822073610.27205-1-yangyicong@huawei.com) | v5 之前叫 [sched/fair: Wake task within the cluster when possible](https://lore.kernel.org/all/20220126080947.4529-1-yangyicong@hisilicon.com). 这个补丁集负责唤醒路径的 cluster 感知, 在扫描整个 LLC 之前, 先在同一集群中其他的 CPU 尝试一下, 以使这些任务能够相互通信.<br>1. 引入 SD_CLUSTER 标记 cluster 域, 使用 per_cpu(sd_cluster, cpu) 和 per_cpu(sd_share_id, cpu) 标记 CPU 所属的 cluster 及其 ID<br>2. 接着 select_idle_cpu() 试图在扫描整个 LLC 之前先通过 scan_cluster() 找到目标 CPU cluster 域 per_cpu(sd_cluster, target) 内空闲的 CPU, 以获得更低的延迟. | v2 ☐☑✓ | [LORE 0/2](https://lore.kernel.org/lkml/20211215041149.73171-1-yangyicong@hisilicon.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/2](https://lore.kernel.org/all/20220126080947.4529-1-yangyicong@hisilicon.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/2](https://lore.kernel.org/lkml/20220608095758.60504-1-yangyicong@hisilicon.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/2](https://lore.kernel.org/lkml/20220609120622.47724-1-yangyicong@hisilicon.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/2](https://lore.kernel.org/lkml/20220720081150.22167-1-yangyicong@hisilicon.com)<br>*-*-*-*-*-*-*-* <br>[LORE v6,0/2](https://lore.kernel.org/lkml/20220726074758.46686-1-yangyicong@huawei.com)<br>*-*-*-*-*-*-*-* <br>[LORE v7,0/2](https://lore.kernel.org/all/20220822073610.27205-1-yangyicong@huawei.com) |
|
||||
| 2023/04/10 | K Prateek Nayak <kprateek.nayak@amd.com> | [arch/x86: Set L2 Cache ID on AMD processors](https://lore.kernel.org/all/20230410163527.1626-1-kprateek.nayak@amd.com) | 将 Cluster Scheduler 扩展到 AMD 处理器上. 将 "l2c_id" 与拓扑扩展 "TOPOEXT" 特性连接起来, 用于在 AMD 处理器上设置, 以便共享相同 L2 缓存的线程集可以正确地映射到相同的集群 ID. 参见 phoronix 报道 [Linux Cluster-Aware Scheduling Being Extended To AMD Processors](https://www.phoronix.com/news/AMD-Linux-L2-Cluster-Scheduler) | v1 ☐☑✓ | [LORE v1,0/2](https://lore.kernel.org/all/20230410163527.1626-1-kprateek.nayak@amd.com) |
|
||||
|
||||
|
||||
### 5.5.2 Multiple LLCs
|
||||
@@ -5621,8 +5644,10 @@ PREEMPT-RT PATCH 的核心思想是最小化内核中不可抢占部分的代码
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2017/05/12 | Rohit Jain <rohit.k.jain@oracle.com> | [Interrupt Aware Scheduler](https://lkml.org/lkml/2017/5/12/512) | NA | v1 ☐ | [LORE 0/5](https://lore.kernel.org/lkml/1494612267-29465-1-git-send-email-rohit.k.jain@oracle.com) |
|
||||
| 2021/09/20 | Libo Chen <libo.chen@oracle.com> | [Overeager pulling from wake_wide() in interrupt heavy workloads](https://lkml.org/lkml/2017/5/12/512) | 当前 wake_affine() 机制并不感知 ISR 唤醒的场景, 在这种场景下, 在中断上下文发起唤醒 wakee 进程的请求, 其实的 waker 并不是真正的 waker, 而是因为唤醒发生时中断正好打断了这个 waker 进程. wake_affine() 机制仍旧比较 waker/wakee 进程的 wakee_flips 到导致错误的唤醒. 作者讲了一个 IST 唤醒的场景, 导致 CPU 唤醒到中断所在的 NUMA NODE, 但是系统中其他 NODE 却是空闲的. | v1 ☐ | [Slide](https://linuxplumbersconf.org/event/11/contributions/1044/attachments/801/1508/lpc21_wakeup_pulling_libochen.pdf) |
|
||||
| 2022/08/22 | John Stultz <jstultz@google.com> | [Softirq -rt Optimizations](https://lore.kernel.org/all/20220822190501.2171100-1-jstultz@google.com) | 长时间运行的 softirq 会导致问题, 如果实时任务被放置在当前运行 softirq 的 CPU 上, 它们会延迟实时任务的运行. 但是当前调度器并没有很好地考虑这种情况. 这些更改已在 Android 设备上发布多年 [ANDROID: sched: avoid placing RT threads on cores handling softirqs](https://github.com/aosp-mirror/kernel_common/commit/3adfd8e344ac32845eb3c15743f90a7e3b49dcf3), 最初是为了解决网络或存储驱动程序软件所导致的设备上的音频故障而创建的. | v2 ☐☑✓ | [LORE v2,0/2](https://lore.kernel.org/all/20220822190501.2171100-1-jstultz@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/2](https://lore.kernel.org/all/20220822190501.2171100-1-jstultz@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/3](https://lore.kernel.org/all/20220921012550.3288570-1-jstultz@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/3](https://lore.kernel.org/all/20221003232033.3404802-1-jstultz@google.com) |
|
||||
| 2022/08/22 | John Stultz <jstultz@google.com> | [Softirq aware -rt scheduling](https://lore.kernel.org/all/20220822190501.2171100-1-jstultz@google.com) | 长时间运行的 softirq 会导致问题, 如果实时任务被放置在当前运行 softirq 的 CPU 上, 它们会延迟实时任务的运行. 但是当前调度器并没有很好地考虑这种情况. 这些更改已在 Android 设备上发布多年 [ANDROID: sched: avoid placing RT threads on cores handling softirqs](https://github.com/aosp-mirror/kernel_common/commit/3adfd8e344ac32845eb3c15743f90a7e3b49dcf3), 最初是为了解决网络或存储驱动程序软件所导致的设备上的音频故障而创建的. [Juggling software interrupts and realtime tasks](https://lwn.net/Articles/915320). 引入 CONFIG_RT_SOFTIRQ_AWARE_SCHED, 涉及两部分优化:<br>1. 第一部分修改其实时任务的 SELECT_TASK_RQ. 防止将一个 RT 任务放置在一个速度较慢(充斥着软中断)的 CPU 上. Stultz 的补丁增加了一个新的检查, 看看一个候选 CPU 是否正在处理(或即将处理)一个"缓慢"的软件中断, 预计需要相当长的处理时间; 为了这个决定的目的, "缓慢"被定义为来自网络或块子系统的软件中断. 如果 CPU 确实以这种方式繁忙, 调度程序将尝试将实时任务放在其他地方.<br>2. 第二部分改变了内核选择运行软件中断处理程序的方式. 通常, 除非 ksoftirqd 线程已经在运行, 否则这些处理程序将尽快在当前 CPU 上运行, 在这种情况下, 它们将在那里排队等待处理. 补丁使内核在运行软件中断处理程序之前检查当前 CPU 上是否有实时任务在运行; 如果有, 并且如果软件中断是"慢"类型的, 那么它将延迟到 ksoftirqd, 以便实时任务可以继续运行. 更快的软件中断(比如定时器中断)仍然会立即在当前 CPU 上执行. | v2 ☐☑✓ | [LORE v2,0/2](https://lore.kernel.org/all/20220822190501.2171100-1-jstultz@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/2](https://lore.kernel.org/all/20220822190501.2171100-1-jstultz@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/3](https://lore.kernel.org/all/20220921012550.3288570-1-jstultz@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/3](https://lore.kernel.org/all/20221003232033.3404802-1-jstultz@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/3](https://lore.kernel.org/all/20221116075929.453876-1-jstultz@google.com) |
|
||||
| 2020/12/04 | Thomas Gleixner <tglx@linutronix.de> | [softirq: Make it RT aware](https://lore.kernel.org/all/20201204170151.960336698@linutronix.de) | TODO | v2 ☐☑✓ | [LORE v2,0/9](https://lore.kernel.org/all/20201204170151.960336698@linutronix.de) |
|
||||
| 2022/11/16 | John Stultz <jstultz@google.com> | [](https://lore.kernel.org/all/20221116075929.453876-1-jstultz@google.com) | | v5 ☐☑✓ | |
|
||||
| 2022/12/22 | Jakub Kicinski <kuba@kernel.org> | [softirq: uncontroversial change](https://lore.kernel.org/all/20221222221244.1290833-1-kuba@kernel.org) | [Heuristics for software-interrupt processing](https://lwn.net/Articles/925540) | v1 ☐☑✓ | [LORE v1,0/3](https://lore.kernel.org/all/20221222221244.1290833-1-kuba@kernel.org) |
|
||||
|
||||
|
||||
## 8.9 QoS
|
||||
@@ -5705,6 +5730,8 @@ enqueue_task_fair()
|
||||
| 2020/02/28 | Parth Shah <parth@linux.ibm.com> | [Introduce per-task latency_nice for scheduler hints](https://lore.kernel.org/all/20200228090755.22829-1-parth@linux.ibm.com) | 20200228090755.22829-1-parth@linux.ibm.com | v5 ☐☑✓ | [LORE v4,0/4](https://lore.kernel.org/lkml/20200224085918.16955-1-parth@linux.ibm.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/4](https://lore.kernel.org/all/20200228090755.22829-1-parth@linux.ibm.com) |
|
||||
| 2020/05/07 | Parth Shah <parth@linux.ibm.com> | [IDLE gating in presence of latency-sensitive tasks](https://lore.kernel.org/all/20200507133723.18325-1-parth@linux.ibm.com) | 20200507133723.18325-1-parth@linux.ibm.com | v1 ☐☑✓ | [LORE v1,0/4](https://lore.kernel.org/all/20200507133723.18325-1-parth@linux.ibm.com) |
|
||||
| 2022/09/16 | Vincent Guittot <vincent.guittot@linaro.org> | [Add latency_nice priority](https://lore.kernel.org/all/20220311161406.23497-1-vincent.guittot@linaro.org) | 参见 [Improved response times with latency nice](https://lwn.net/Articles/887842). | v1 ☐☑✓ | [2022/03/11 LORE v1,0/6](https://lore.kernel.org/all/20220311161406.23497-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2022/05/12 LORE v2,0/7](https://lore.kernel.org/all/20220512163534.2572-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2022/09/09 LORE v3,0/8](https://lore.kernel.org/all/20220909130309.25458-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2022/09/16 LORE v4,0/8](https://lore.kernel.org/all/20220916080305.29574-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2022/09/25 LORE v5,0/8](https://lore.kernel.org/all/20220925143908.10846-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2022/10/28 LORE v6,0/9](https://lore.kernel.org/all/20221028073637.31195-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2022/10/28 LORE v7,0/9](https://lore.kernel.org/all/20221028093403.6673-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2022/11/10 LORE v8,0/9](https://lore.kernel.org/all/20221110175009.18458-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2022/11/15 LORE v9,0/9](https://lore.kernel.org/all/20221115171851.835-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2023/01/13 LORE v10,0/9](https://lore.kernel.org/all/20230113141234.260128-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2023/02/23 LORE v11,0/9](https://lore.kernel.org/all/20230223191041.577305-1-vincent.guittot@linaro.org)<br>*-*-*-*-*-*-*-* <br>[2023/02/24 LORE v12,0/8](https://lore.kernel.org/all/20230224093454.956298-1-vincent.guittot@linaro.org/) |
|
||||
| 2023/03/28 | Peter Zijlstra <peterz@infradead.org> | [sched: EEVDF using latency-nice](https://lore.kernel.org/all/20230328092622.062917921@infradead.org) | TODO | v1 ☐☑✓ | [LORE 00/10](https://lore.kernel.org/all/20230306132521.968182689@infradead.org)<br>*-*-*-*-*-*-*-* <br>[LORE v1,0/17](https://lore.kernel.org/all/20230328092622.062917921@infradead.org) |
|
||||
|
||||
|
||||
### 8.9.2 Xen CPU Scheduling
|
||||
-------
|
||||
@@ -5744,7 +5771,7 @@ Xen 的 CPU 调度算法主要有 3 种: BVT(borrowed virtual time)调度算法
|
||||
|
||||
- 另外一种思路是为时延不敏感的离线任务, 新增一个优先级比 CFS 低的调度类.
|
||||
|
||||
[sched: Add micro quanta scheduling class](https://lkml.org/lkml/2019/9/6/178) 在 RT 之后, CFS 之前实现了一个类似于 RT 的策略, 为在线任务提供服务, 来解决同样的问题.
|
||||
[sched: Add micro quanta scheduling class](https://lore.kernel.org/all/20190906093412.233463-2-xii@google.com) 在 RT 之后, CFS 之前实现了一个类似于 RT 的策略, 为在线任务提供服务, 来解决同样的问题.
|
||||
|
||||
- 当前其实很多情况下使用 SCHED_IDLE 策略也已经能满足我们的基本要求, SCHED_NORMAL 可以抢占 SCHED_IDLE, 而 SCHED_IDLE 的进程也只有在空闲时候才出来蹦跶蹦跶.
|
||||
|
||||
@@ -6018,6 +6045,9 @@ ANDROID 8 实现了 BINDER 对实时优先级传递的支持. 但是经过测试
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2021/09/08 | Peter Oskolkov <posk@google.com>/<posk@posk.io> | [google ghOSt](https://github.com/google/ghost-kernel) | ghOSt 是在 Linux 内核上实现的用户态调度策略的通用代理. ghOSt 框架提供了一个丰富的 API, 该 API 从用户空间接收进程的调度决策, 并将其作为事务执行. 程序员可以使用任何语言或工具来开发策略, 这些策略可以在不重新启动机器的情况下升级. ghOSt 支持一系列调度目标的策略, 从 µs 级延迟到吞吐量, 再到能源效率, 等等, 并且调度操作的开销较低. 许多策略只是几百行代码. 总之, ghOSt 提供了一个性能框架, 用于将线程调度策略委托给用户空间进程, 从而实现策略优化、无中断升级和故障隔离. | [github kernel](https://github.com/google/ghost-kernel)<br>*-*-*-*-*-*-*-* <br>[github userspace](https://github.com/google/ghost-userspace) |
|
||||
|
||||
| 论文 | 描述 |
|
||||
|:---:|:----:|
|
||||
| [Rhodes: A Next-Generation OS based on Resource Governance Model](https://www.techrxiv.org/articles/preprint/Next_Generation_Operating_System_based_on_Resource_Governance_Model/21371505/5) | 本文提出Rhodes, 基于资源治理模型, 解耦资源和规则, 构建统一资源治理中心, 支持规则动态修改和扩展, 使资源的组织有序、灵活、可扩展, 非常像大号的Google ghost:<br>(1) Governance Center: 管理和维护软硬件资源规则. 支持静态规则发现、动态规则发现. 通过规则和资源的分离, 它确保了GC规则的可扩展性和灵活性.<br>(2) Agent Process: Agent进程与资源进程绑定, 资源间的通信被转化为代理间的通信, 允许开发者使用跨语言协议.<br>(3) Static rule discovery: 通过发布-订阅模型, 代理可以监听存储在治理中心中的静态规则的变化. 规则变更时, GC实时推送新规则到代理.<br>(4) Dynamic rule discovery: 允许用户自定义资源之间的通信策略. 参见 [【欧拉多咖 | OS每周快讯】2022.12.06~2022.12.12](https://www.chaspark.com/#/hotspots/821172234535870464) |
|
||||
|
||||
### 11.2.1.3 Upcalls
|
||||
-------
|
||||
@@ -6054,7 +6084,7 @@ Google 的 Peter Oskolkov 发布了[最早的 RFC v0.1 补丁](https://lore.kern
|
||||
|:----:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2021/12/14 | Peter Oskolkov <posk@google.com>/<posk@posk.io> | [sched,mm,x86/uaccess: implement User Managed Concurrency Groups](https://lore.kernel.org/patchwork/cover/1433967) | UMCG (User-Managed Concurrency Groups) | [PatchWork RFC,v0.1,0/9](https://lore.kernel.org/patchwork/cover/1433967)<br>*-*-*-*-*-*-*-* <br>[2021/07/08 PatchWork RFC,0/3,v0.2](https://lore.kernel.org/patchwork/cover/1455166)<br>*-*-*-*-*-*-*-* <br>[2021/07/16 PatchWork RFC,0/4,v0.3](https://lore.kernel.org/patchwork/cover/1461708)<br>*-*-*-*-*-*-*-* <br>[2021/08/01 PatchWork 0/4,v0.4](https://lore.kernel.org/patchwork/cover/1470650)<br>*-*-*-*-*-*-*-* <br>[2021/08/01 LWN 0/4,v0.5](https://lore.kernel.org/patchwork/cover/1470650)<br>*-*-*-*-*-*-*-* <br>[2021/10/12 PatchWork v0.7,0/5](https://patchwork.kernel.org/project/linux-mm/cover/20211012232522.714898-1-posk@google.com)<br>*-*-*-*-*-*-*-* <br>[2021/11/04 PatchWork v0.8,0/6](https://patchwork.kernel.org/project/linux-mm/cover/20211104195804.83240-1-posk@google.com)<br>*-*-*-*-*-*-*-* <br>[2021/11/21 PatchWork v0.9,0/6](https://patchwork.kernel.org/project/linux-mm/cover/20211121212040.8649-1-posk@google.com)<br>*-*-*-*-*-*-*-* <br>[2021/11/23 PatchWork v0.9.1,0/6](https://patchwork.kernel.org/project/linux-mm/cover/20211122211327.5931-1-posk@google.com) |
|
||||
| 2022/01/20 | Paul Gortmaker <paul.gortmaker@windriver.com> | [sched: User Managed Concurrency Groups](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=abedf8e2419fb873d919dd74de2e84b510259339) | Peter Zijlstra 对 UMCG 的重新实现. | v9 ☑ 4.6-rc1 | [PatchWork RFC,0/3](https://patchwork.kernel.org/project/linux-mm/cover/20211214204445.665580974@infradead.org)<br>*-*-*-*-*-*-*-* <br>[PatchWork RFC,v2,0/5](https://patchwork.kernel.org/project/linux-mm/cover/20220120155517.066795336@infradead.org) |
|
||||
| 2022/10/19 | Andrei Vagin <avagin@gmail.com> | [seccomp: add the synchronous mode for seccomp_unotify](https://lore.kernel.org/all/20221020011048.156415-1-avagin@gmail.com) | seccomp_unotify 允许特权更大的进程代表特权更小的进程执行操作. 在许多情况下, 工作流是完全同步的. 它意味着一个目标进程触发一个系统调用, 并将控制传递给一个主管进程, 后者处理系统调用并将控制返回给目标进程. 在这个上下文中, "同步" 意味着只有一个进程在运行, 另一个正在等待.<br> 新的 WF_CURRENT_CPU 标志建议调度器将唤醒对象移动到当前 CPU. 对于这样的同步工作流, 它使上下文切换速度提高了几倍. 测试发现, 原来每个相互作用需要 12µs, 借助这个补丁这个过程只需要 3µs. | v2 ☐☑✓ | [LORE v2,0/5](https://lore.kernel.org/all/20221020011048.156415-1-avagin@gmail.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/6](https://lore.kernel.org/lkml/20230124234156.211569-1-avagin@google.com) |
|
||||
| 2022/10/19 | Andrei Vagin <avagin@gmail.com> | [seccomp: add the synchronous mode for seccomp_unotify](https://lore.kernel.org/all/20221020011048.156415-1-avagin@gmail.com) | seccomp_unotify 允许特权更大的进程代表特权更小的进程执行操作. 在许多情况下, 工作流是完全同步的. 它意味着一个目标进程触发一个系统调用, 并将控制传递给一个主管进程, 后者处理系统调用并将控制返回给目标进程. 在这个上下文中, "同步" 意味着只有一个进程在运行, 另一个正在等待.<br> 新的 WF_CURRENT_CPU 标志建议调度器将唤醒对象移动到当前 CPU. 对于这样的同步工作流, 它使上下文切换速度提高了几倍. 测试发现, 原来每个相互作用需要 12µs, 借助这个补丁这个过程只需要 3µs. | v2 ☐☑✓ | [LORE v2,0/5](https://lore.kernel.org/all/20221020011048.156415-1-avagin@gmail.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/6](https://lore.kernel.org/lkml/20230124234156.211569-1-avagin@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/6](https://lore.kernel.org/all/20230308073201.3102738-1-avagin@google.com) |
|
||||
|
||||
|
||||
### 11.2.2 基于 eBPF 的可编程调度框架
|
||||
|
||||
@@ -24,7 +24,7 @@ https://lore.kernel.org/patchwork/project/lkml/list/?submitter=13305
|
||||
|
||||
|
||||
|
||||
| 2022/09/13 | Doug Berger <opendmb@gmail.com> | [mm: introduce Designated Movable Blocks](https://patchwork.kernel.org/project/linux-mm/cover/20220913195508.3511038-1-opendmb@gmail.com/) | 676674 | v1 ☐☑ | [LORE v1,0/21](https://lore.kernel.org/r/20220913195508.3511038-1-opendmb@gmail.com) |
|
||||
| 2022/09/13 | Doug Berger <opendmb@gmail.com> | [mm: introduce Designated Movable Blocks](https://patchwork.kernel.org/project/linux-mm/cover/20220913195508.3511038-1-opendmb@gmail.com/) | 676674 | v1 ☐☑ | [LORE v1,0/21](https://lore.kernel.org/r/20220913195508.3511038-1-opendmb@gmail.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/9](https://lore.kernel.org/r/20230311003855.645684-1-opendmb@gmail.com) |
|
||||
|
||||
|
||||
[Linux RSEQ Patches Updated For Allowing Faster getCPU () In C Libraries](https://www.phoronix.com/news/Linux-RSEQ-Faster-getCPU)
|
||||
@@ -35,13 +35,6 @@ https://lore.kernel.org/patchwork/project/lkml/list/?submitter=13305
|
||||
|
||||
|
||||
|
||||
| 2022/09/26 | Zhongkun He <hezhongkun.hzk@bytedance.com> | [[RFC] proc: Add a new isolated /proc/pid/mempolicy type.](https://patchwork.kernel.org/project/linux-mm/patch/20220926091033.340-1-hezhongkun.hzk@bytedance.com/) | 680392 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20220926091033.340-1-hezhongkun.hzk@bytedance.com) |
|
||||
|
||||
| 2022/09/29 | Shradha Gupta <shradhagupta@linux.microsoft.com> | [Configurable order free page reporting in hyper-v](https://patchwork.kernel.org/project/linux-mm/cover/1664447081-14744-1-git-send-email-shradhagupta@linux.microsoft.com/) | 681863 | v1 ☐☑ | [LORE v1,0/2](https://lore.kernel.org/r/1664447081-14744-1-git-send-email-shradhagupta@linux.microsoft.com) |
|
||||
| 2022/10/04 | Yosry Ahmed <yosryahmed@google.com> | [mm/vmscan: check references from all memcgs for swapbacked memory](https://patchwork.kernel.org/project/linux-mm/patch/20221004233446.787056-1-yosryahmed@google.com/) | 683116 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20221004233446.787056-1-yosryahmed@google.com) |
|
||||
|
||||
|
||||
|
||||
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|
||||
|:---:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2022/10/19 | Andrei Vagin <avagin@gmail.com> | [seccomp: add the synchronous mode for seccomp_unotify](https://lore.kernel.org/all/20221020011048.156415-1-avagin@gmail.com) | TODO | v2 ☐☑✓ | [LORE v2,0/5](https://lore.kernel.org/all/20221020011048.156415-1-avagin@gmail.com) |
|
||||
@@ -204,7 +197,6 @@ https://www.latexlive.com
|
||||
| 2020/02/27 | Valentin Schneider <valentin.schneider@arm.com> | [sched, arm64: enable CONFIG_SCHED_SMT for arm64](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=6f693dd5be08237b337f557c510d99addb9eb9ec) | TODO | v2 ☑✓ 5.7-rc1 | [LORE v2,0/2](https://lore.kernel.org/all/20200227191433.31994-1-valentin.schneider@arm.com) |
|
||||
| 2022/12/02 | Brian Foster <bfoster@redhat.com> | [proc: improve root readdir latency with many threads](https://lore.kernel.org/all/20221202171620.509140-1-bfoster@redhat.com) | TODO | v3 ☐☑✓ | [LORE v3,0/5](https://lore.kernel.org/all/20221202171620.509140-1-bfoster@redhat.com) |
|
||||
| 2023/01/09 | Yian Chen <yian.chen@intel.com> | [Enable LASS (Linear Address space Separation)](https://lore.kernel.org/all/20230110055204.3227669-1-yian.chen@intel.com) | 参见 LWN 报道 [Support for Intel's LASS](https://lwn.net/Articles/919683) 和 phoronix 报道 [Intel Posts Linux Patches For Linear Address Space Separation (LASS)](https://www.phoronix.com/news/Linear-Address-Space-Separation) | v1 ☐☑✓ | [LORE v1,0/7](https://lore.kernel.org/all/20230110055204.3227669-1-yian.chen@intel.com) |
|
||||
| 2023/02/01 | Marcelo Tosatti <mtosatti@redhat.com> | [fold per-CPU vmstats remotely](https://patchwork.kernel.org/project/linux-mm/cover/20230201195013.881721887@redhat.com/) | 717871 | v1 ☐☑ | [LORE v1,0/5](https://lore.kernel.org/r/20230201195013.881721887@redhat.com) |
|
||||
| 2023/02/02 | Yosry Ahmed <yosryahmed@google.com> | [Ignore non-LRU-based reclaim in memcg reclaim](https://patchwork.kernel.org/project/linux-mm/cover/20230202233229.3895713-1-yosryahmed@google.com/) | 718353 | v1 ☐☑ | [LORE v1,0/2](https://lore.kernel.org/r/20230202233229.3895713-1-yosryahmed@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v1,0/2](https://lore.kernel.org/r/20230228085002.2592473-1-yosryahmed@google.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/3](https://lore.kernel.org/r/20230309093109.3039327-1-yosryahmed@google.com) |
|
||||
| 2023/02/05 | Yafang Shao <laoar.shao@gmail.com> | [bpf, mm: introduce cgroup.memory=nobpf](https://patchwork.kernel.org/project/linux-mm/cover/20230205065805.19598-1-laoar.shao@gmail.com/) | 718891 | v1 ☐☑ | [LORE v1,0/5](https://lore.kernel.org/r/20230205065805.19598-1-laoar.shao@gmail.com)<br>*-*-*-*-*-*-*-* <br>[LORE v2,0/4](https://lore.kernel.org/r/20230210154734.4416-1-laoar.shao@gmail.com) |
|
||||
| 2023/02/06 | Dan Williams <dan.j.williams@intel.com> | [CXL RAM and the'Soft Reserved'=> 'System RAM' default](https://patchwork.kernel.org/project/linux-mm/cover/167564534874.847146.5222419648551436750.stgit@dwillia2-xfh.jf.intel.com/) | 718969 | v1 ☐☑ | [LORE v1,0/18](https://lore.kernel.org/r/167564534874.847146.5222419648551436750.stgit@dwillia2-xfh.jf.intel.com) |
|
||||
@@ -331,7 +323,6 @@ https://www.latexlive.com
|
||||
[Linux Developers Evaluating New"DOITM"Security Mitigation For Latest Intel CPUs](https://www.phoronix.com/review/intel-doitm-linux)
|
||||
|
||||
|
||||
| 2023/01/31 | Xi Wang <xii@google.com> | [sched: Consider capacity for certain load balancing decisions](https://lore.kernel.org/all/20230201012032.2874481-1-xii@google.com) | TODO | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20230201012032.2874481-1-xii@google.com) |
|
||||
|
||||
|
||||
|
||||
@@ -348,14 +339,23 @@ https://www.latexlive.com
|
||||
|:---:|:----:|:---:|:----:|:---------:|:----:|
|
||||
| 2022/01/08 | Andy Lutomirski <luto@kernel.org> | [mm, sched: Rework lazy mm handling](https://lore.kernel.org/all/cover.1641659630.git.luto@kernel.org) | TODO | v1 ☐☑✓ | [LORE v1,0/23](https://lore.kernel.org/all/cover.1641659630.git.luto@kernel.org) |
|
||||
|
||||
| 2023/03/03 | Marcelo Tosatti <mtosatti@redhat.com> | [fold per-CPU vmstats remotely](https://patchwork.kernel.org/project/linux-mm/cover/20230303195841.310844446@redhat.com/) | 726527 | v3 ☐☑ | [LORE v3,0/11](https://lore.kernel.org/r/20230303195841.310844446@redhat.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/12](https://lore.kernel.org/r/20230305133657.255737580@redhat.com) |
|
||||
| 2023/03/03 | Marcelo Tosatti <mtosatti@redhat.com> | [fold per-CPU vmstats remotely](https://patchwork.kernel.org/project/linux-mm/cover/20230303195841.310844446@redhat.com/) | 726527 | v3 ☐☑ | [LORE v1,0/5](https://lore.kernel.org/r/20230201195013.881721887@redhat.com)<br>*-*-*-*-*-*-*-* <br>[LORE v3,0/11](https://lore.kernel.org/r/20230303195841.310844446@redhat.com)<br>*-*-*-*-*-*-*-* <br>[LORE v4,0/12](https://lore.kernel.org/r/20230305133657.255737580@redhat.com)<br>*-*-*-*-*-*-*-* <br>[LORE v5,0/12](https://lore.kernel.org/r/20230313162507.032200398@redhat.com)<br>*-*-*-*-*-*-*-* <br>[LORE v7,0/13](https://lore.kernel.org/r/20230320180332.102837832@redhat.com) |
|
||||
|
||||
| 2023/03/06 | James Houghton <jthoughton@google.com> | [mm: rmap: merge HugeTLB mapcount logic with THPs](https://patchwork.kernel.org/project/linux-mm/cover/20230306230004.1387007-1-jthoughton@google.com/) | 727125 | v1 ☐☑ | [LORE v1,0/2](https://lore.kernel.org/r/20230306230004.1387007-1-jthoughton@google.com) |
|
||||
| 2023/03/08 | Mike Rapoport <rppt@kernel.org> | [Prototype for direct map awareness in page allocator](https://patchwork.kernel.org/project/linux-mm/cover/20230308094106.227365-1-rppt@kernel.org/) | 727808 | v1 ☐☑ | [LORE v1,0/5](https://lore.kernel.org/r/20230308094106.227365-1-rppt@kernel.org) |
|
||||
| 2023/03/14 | chenjun (AM) <chenjun102@huawei.com> | [mm/slub: Reduce memory consumption in extreme scenarios](https://patchwork.kernel.org/project/linux-mm/patch/20230314123403.100158-1-chenjun102@huawei.com/) | 729899 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20230314123403.100158-1-chenjun102@huawei.com) |
|
||||
| 2023/03/14 | Heiko Carstens <hca@linux.ibm.com> | [[-next] s390/mm: try VMA lock-based page fault handling first](https://patchwork.kernel.org/project/linux-mm/patch/20230314132808.1266335-1-hca@linux.ibm.com/) | 729931 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20230314132808.1266335-1-hca@linux.ibm.com) |
|
||||
| 2023/03/15 | GONG, Ruiqi <gongruiqi1@huawei.com> | [[RFC] Randomized slab caches for kmalloc()](https://patchwork.kernel.org/project/linux-mm/patch/20230315095459.186113-1-gongruiqi1@huawei.com/) | 730246 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20230315095459.186113-1-gongruiqi1@huawei.com) |
|
||||
| 2023/03/16 | Gou Hao <gouhao@uniontech.com> | [mm/slub: reduce the calculation times of'MAX_OBJS_PER_PAGE'](https://patchwork.kernel.org/project/linux-mm/patch/20230316012517.10479-1-gouhao@uniontech.com/) | 730565 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20230316012517.10479-1-gouhao@uniontech.com) |
|
||||
| 2023/03/16 | Yang Yang <yang.yang29@zte.com.cn> | [[linux-next] mm: workingset: simplify the calculation of workingset size](https://patchwork.kernel.org/project/linux-mm/patch/202303161723055514455@zte.com.cn/) | 730688 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/202303161723055514455@zte.com.cn) |
|
||||
| 2023/03/16 | Alexandre Ghiti <alexghiti@rivosinc.com> | [riscv: Use PUD/P4D/PGD pages for the linear mapping](https://patchwork.kernel.org/project/linux-mm/cover/20230316131711.1284451-1-alexghiti@rivosinc.com/) | 730795 | v8 ☐☑ | [LORE v8,0/4](https://lore.kernel.org/r/20230316131711.1284451-1-alexghiti@rivosinc.com) |
|
||||
| 2023/03/16 | Ritesh Harjani (IBM) <ritesh.list@gmail.com> | [[RFCv1,WIP] ext2: Move direct-io to use iomap](https://patchwork.kernel.org/project/linux-mm/patch/eae9d2125de1887f55186668937df7475b0a33f4.1678977084.git.ritesh.list@gmail.com/) | 730837 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/eae9d2125de1887f55186668937df7475b0a33f4.1678977084.git.ritesh.list@gmail.com) |
|
||||
| 2023/03/19 | buddy.zhang <buddy.zhang@biscuitos.cn> | [mm: Keep memory type same on DEVMEM Page-Fault](https://patchwork.kernel.org/project/linux-mm/patch/20230319033750.475200-1-buddy.zhang@biscuitos.cn/) | 731498 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20230319033750.475200-1-buddy.zhang@biscuitos.cn) |
|
||||
| 2023/03/20 | mawupeng <mawupeng1@huawei.com> | [Add overflow checks for several syscalls](https://patchwork.kernel.org/project/linux-mm/cover/20230320024739.224850-1-mawupeng1@huawei.com/) | 731660 | v4 ☐☑ | [LORE v4,0/4](https://lore.kernel.org/r/20230320024739.224850-1-mawupeng1@huawei.com) |
|
||||
keyiya1keyiya1 ke
|
||||
|
||||
|
||||
|
||||
|
||||
https://lore.kernel.org/all/20230312080945.14171-1-ypodemsk@redhat.com/
|
||||
|
||||
|
||||
|
||||
@@ -370,3 +370,54 @@ https://www.latexlive.com
|
||||
[How to Use Performance Monitor Unit(PMU) of 64-bit ARMv8-A in Linux](https://blog.csdn.net/omnispace/article/details/79517182)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
| 2023/03/30 | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | [sched: Introduce per-mm/cpu concurrency id state](https://lore.kernel.org/all/20230330230911.228720-1-mathieu.desnoyers@efficios.com) | TODO | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20230330230911.228720-1-mathieu.desnoyers@efficios.com) |
|
||||
|
||||
|
||||
|
||||
[Linux Will Stop Randomizing Per-CPU Entry Area When KASLR Is Not Active](https://www.phoronix.com/news/Linux-Random-Per-CPU-Entry-ASLR)
|
||||
|
||||
[Linux 6.4 Preparing DRM Deadline Hints To Help Influence GPU Frequency/Performance](https://www.phoronix.com/news/DMA-BUF-Fence-Deadline-6.4)
|
||||
|
||||
|
||||
[Reducing direct-map fragmentation with `__GFP_UNMAPPED`](https://lwn.net/Articles/926020)
|
||||
[Generic iterators for BPF](https://lwn.net/Articles/926041)
|
||||
|
||||
|
||||
[Zephyr: a modular OS for resource-constrained devices](https://lwn.net/Articles/925924)
|
||||
|
||||
|
||||
|
||||
| 2022/06/06 | Ankur Arora <ankur.a.arora@oracle.com> | [huge page clearing optimizations](https://lore.kernel.org/all/20220606202109.1306034-1-ankur.a.arora@oracle.com) | TODO | v3 ☐☑✓ | [LORE v3,0/21](https://lore.kernel.org/all/20220606202109.1306034-1-ankur.a.arora@oracle.com) |
|
||||
| 2023/04/02 | Ankur Arora <ankur.a.arora@oracle.com> | [x86/clear_huge_page: multi-page clearing](https://lore.kernel.org/all/20230403052233.1880567-1-ankur.a.arora@oracle.com) | TODO | v1 ☐☑✓ | [LORE v1,0/9](https://lore.kernel.org/all/20230403052233.1880567-1-ankur.a.arora@oracle.com) |
|
||||
| 2023/04/01 | Xi Wang <xii@google.com> | [Morphing CFS into FDL, The Fair Deadline Scheduling Class](https://lore.kernel.org/all/20230401230556.2781604-1-xii@google.com) | TODO | v1 ☐☑✓ | [LORE v1,0/1](https://lore.kernel.org/all/20230401230556.2781604-1-xii@google.com) |
|
||||
|
||||
|
||||
|
||||
| 2023/03/30 | David Dai <davidai@google.com> | [Improve VM CPUfreq and task placement behavior](https://lore.kernel.org/all/20230331014356.1033759-1-davidai@google.com) | [CPUfreq/sched and VM guest workload problems](https://lpc.events/event/16/contributions/1195) | v2 ☐☑✓ | [LORE v2,0/6](https://lore.kernel.org/all/20230331014356.1033759-1-davidai@google.com) |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
通常, 当操作系统内核启动时, 它会发现可用内存并愉快地设置自己以使用该内存. 但是, UEFI 规范的 2.9 版添加了不可接受内存 (unaccepted memory) 的概念; 使用此机制时, 系统 (通常是虚拟化来宾) 将启动, 其内存处于不可接受状态. 在明确接受内存之前, 该系统将无法使用提供的内存. 在此类系统上, 引导加载程序通常会预先接受足够的内存以允许来宾内核引导; 该内核在使用之前必须负责接受其余部分.
|
||||
|
||||
| 优势 | 描述 |
|
||||
|:---:|:----:|
|
||||
| 加速开启 TDX/SEV-SNP 后虚拟机的启动. | SEV-SNP 和英特尔 TDX 等安全访客环境可以通过加密、反向映射表等方式保护其内存内容免受主机和其他访客的影响. 但是, 设置该保护需要一些时间, 这会大大减慢启动过程. 显式接受步骤允许操作系统随时间推移内存初始化. 如果仅在需要时以块形式接受内存, 则系统将更快地启动到运行状态. 来自 Kirill Shutemov 的添加未接受内存支持的补丁利用了这一点, 将内存的接受推迟到需要时才接受. |
|
||||
| 显式接受有助于保护安全的来宾免受恶意虚拟机监控程序的侵害 | 这些虚拟机监控程序可能会尝试在后台使用来宾的内存玩游戏. 如果虚拟机监控程序尝试将新页面潜入来宾的地址空间, 则来宾将不接受该新内存, 并且尝试访问它将生成错误. |
|
||||
|
||||
每个供应商的安全环境都有自己的管理验收过程的方法, 因此实现验收的一些代码必须特定于一个子体系结构. Shutemov 的补丁增加了对英特尔 TDX 的支持, 但对 AMD 的 SEV-SNP 的支持来自 Tom Lendacky 的单独补丁集.
|
||||
|
||||
Reference in new issue
Block a user