description/open_source: update phoronix vs LWN to date 20240330

This commit is contained in:
Cheng Jian
2024-04-27 13:12:02 +08:00
parent 3c1efaa0b7
commit f94ad99067
12 changed files with 505 additions and 187 deletions
+50
View File
@@ -0,0 +1,50 @@
---
title: SMT
date: 2021-06-26 09:40
author: gatieme
tags:
- linux
- tools
categories:
- 技术积累
thumbnail:
blogexcerpt: 虚拟化 & KVM 子系统
---
<br>
本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可, 转载请注明出处, 谢谢合作
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>
因本人技术水平和知识面有限, 内容如有纰漏或者需要修正的地方, 欢迎大家指正, 鄙人在此谢谢啦
**转载请务必注明出处, 谢谢, 不胜感激**
<br>
| 日期 | 作者 | GitHub| CSDN | BLOG |
| ------- |:-------:|:-------:|:-------:|:-------:|
| 2022/01/03 | [成坚-gatieme](https://kernel.blog.csdn.net) | [`AderXCoding/system/tools/fzf`](https://github.com/gatieme/AderXCoding/tree/master/system/tools/fzf) | [AMP 异构多核系统研究](https://blog.csdn.net/gatieme/article/details/113828826) | [Using FZF to Improve Productivit](https://oskernellab.com/2021/02/15/2021/0215-0001-Using_FZF_to_Improve_Productivity)|
<br>
# 1
<br>
* 本作品/博文 ( [AderStep-紫夜阑珊-青伶巷草 Copyright ©2013-2017](http://blog.csdn.net/gatieme) ), 由 [成坚(gatieme)](http://blog.csdn.net/gatieme) 创作.
* 采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>进行许可. 欢迎转载、使用、重新发布, 但务必保留文章署名[成坚gatieme](http://blog.csdn.net/gatieme) ( 包含链接: http://blog.csdn.net/gatieme ), 不得用于商业目的.
* 基于本文修改后的作品务必以相同的许可发布. 如有任何疑问, 请与我联系.
* **转载请务必注明出处, 谢谢, 不胜感激**
<br>
+3
View File
@@ -275,6 +275,9 @@ Store Buffer 会引入的数据可见性问题, 因为数据已经修改了, 但
| 37 | [Volatile:内存屏障原理应该没有比这篇文章讲的更清楚了](https://www.bilibili.com/read/cv7429219/) | 提到了一个关键的点: ① 使用了 store buffer 后, 这两个操作是异步的. 这在多线程环境中, 有些情况下是可以接受的, 但是有些情况是不可接受的, 为了让程序员有能力根据业务需要达到同步完成, 就设计了内存屏障. ② 为什么要插入屏障? 本质是业务层面不能接受写 store buffer 与刷回内存这两个异步操作产生的哪怕是极少的延迟, 即对内存可见性的要求极高. |
| 38 | [理解内存屏障 | 《内存屏障就像版本控制一样》](https://zhuanlan.zhihu.com/p/491157678) | Preshing 先生编写的广受好评的文章 [Memory Barriers Are Like Source Control Operations](https://preshing.com/20120710/memory-barriers-are-like-source-control-operations) 的中文译文. |
| 39 | [你应该了解的 memory barrier 背后细节](https://blog.hidva.com/2018/12/05/whymb) | 阅读 [Memory Barriers: a Hardware View for Software Hackers](http://www.rdrop.com/~paulmck/scalability/paper/whymb.2010.07.23a.pdf) 后的一些个人感悟. |
| 40 | [memory barrier 内存屏障 编译器导致的乱序](https://blog.51cto.com/u_15127656/4624589) | 通过一些例子讲解内存屏障的作用 |
<br>
* 本作品 / 博文 ([AderStep - 紫夜阑珊 - 青伶巷草 Copyright ©2013-2017](http://blog.csdn.net/gatieme) ), 由 [成坚 (gatieme)](http://blog.csdn.net/gatieme) 创作.
+6 -1
View File
@@ -275,7 +275,12 @@ XOR a, b
| 17 | [NUMA入门:那些必须知道的基础概念](https://www.it610.com/article/1281587993060065280.htm) | NA |
| 18 | [NUMA Domian和NUMA Distance](https://www.cnblogs.com/kongchung/p/14745803.html) | NA |
| 19 | [如何看待第 12 代英特尔酷睿处理器的产品革新?会给行业带来什么影响?](https://www.zhihu.com/question/494592488/answer/2206656842) | NA |
| 20 | [【芯片学习】X86 CPU 发展历史与分析——1971~2020——明白Intel架构的变迁](https://blog.csdn.net/Hide_in_Code/article/details/113799454) | NA |
| 21 | [Pentium 4处理器架构/微架构/流水线 (11) - NetBurst执行核详解 - Load/Store操作/存储转发](https://stkeke.blog.csdn.net/article/details/85452650) | NA |
| 22 | [8086架构/流水线及其优化](https://stkeke.blog.csdn.net/article/details/85230687) | NA |
| 23 | [Intel X86-64 处理器架构演进](https://zhuanlan.zhihu.com/p/515658946) | NA |
| 24 | [TALK 笔记-处理器体系结构, 历史及演进](https://www.douban.com/note/797605944) | NA |
| 25 | [微电之窗 | 详谈CPU处理器架构演进 (Intel)](https://mp.weixin.qq.com/s?__biz=Mzg3MTIyMTU3OA==&mid=2247509982&idx=2&sn=84a1fd3c140b147a53dee7a7e3329017) |
<br>
+37 -3
View File
@@ -261,7 +261,7 @@ ASYM_PACKING 用于平衡物理核心与 SMT 之间的负载均衡处理 (例如
| 2024/01/31 | Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> | [thermal/netlink/intel_hfi: Enable HFI feature only when required](https://lore.kernel.org/all/20240131120535.933424-1-stanislaw.gruszka@linux.intel.com) | 该补丁集仅在有用户空间实体侦听热网络链接事件时才启用 HFI. 引入了一个 netlink 通知, 它与 netlink_has_listners()检查一起, 允许驱动程序根据实际用户空间消费者的存在发送 netlink 多播事件. 此功能通过允许在不需要时禁用功能来优化资源使用. 然后在 intel_hif 驱动程序中实现通知机制, 用于动态禁用硬件反馈接口 (HFI). 通过实现 netlink 通知回调, 驱动程序现在可以根据实际需求启用或禁用 HFI, 特别是当用户空间应用程序(如英特尔速度选择或英特尔低功耗守护进程) 利用与性能和能效功能相关的事件时. 在有 Intel HFI 但没有安装用户空间组件的机器上, 我们可以节省大量的 CPU 周期. | v1 ☐☑✓ | [LORE v1,0/3](https://lore.kernel.org/all/20240131120535.933424-1-stanislaw.gruszka@linux.intel.com) |
| 2024/02/02 | Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | [thermal: intel: hfi: Prework for the virtualization of HFI](https://lore.kernel.org/all/20240203040515.23947-1-ricardo.neri-calderon@linux.intel.com) | 用于 [支持 IPC 类任务的调度](https://lore.kernel.org/all/20230613042422.5344-1-ricardo.neri-calderon@linux.intel.com) 的基础 <br>1. 重新组织 HFI 驱动程序的部分, 以便于实现虚拟 HFI 表.<br>2. 引入了 ITD 类的概念并启用了 ITD.<br>3. 增加了对重置当前任务的 ITD 分类历史的支持, 以便在上下文切换期间使用. HFI 的虚拟化要求在系统中无条件启用 HFI 和 ITD. 这与 Stanislaw 的补丁集 [thermal/netlink/intel_hfi: Enable HFI feature only when required](https://lore.kernel.org/all/20240131120535.933424-1-stanislaw.gruszka@linux.intel.com) 存在冲突. | v1 ☐☑✓ | [LORE v1,0/9](https://lore.kernel.org/all/20240203040515.23947-1-ricardo.neri-calderon@linux.intel.com) |
| 2024/02/03 | Zhao Liu <zhao1.liu@linux.intel.com> | [Intel Thread Director Virtualization](https://lore.kernel.org/all/20240203091214.411862-1-zhao1.liu@linux.intel.com) | 以虚拟化硬件反馈接口 (HFI) 和英特尔线程控制器(ITD), 从而为使用 ITD 进行调度的虚拟机带来好处. 他的实验表明, 在某些工作负载和配置中, 性能提高了 14%. [Intel Thread Director Virtualization Patches Boost Some Workloads By ~14%](https://www.phoronix.com/news/Intel-Thread-Director-Virt) | v1 ☐☑✓ | [LORE v1,0/26](https://lore.kernel.org/all/20240203091214.411862-1-zhao1.liu@linux.intel.com)|
| 2024/02/23 | Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> | [thermal/netlink/intel_hfi: Enable HFI feature only when required](https://lore.kernel.org/all/20240223155942.60813-1-stanislaw.gruszka@linux.intel.com) | 英特尔 HFI 驱动程序可以在需要时启用它, 从而"节省大量 CPU 周期". 仅在有用户空间使用者处于活动状态时启用它. 如果英特尔 Speed Select 或英特尔低功耗守护程序正在运行, 英特尔 HFI 接口将被激活, 但如果不是, 它将被禁用, 从而显然可以节省大量 CPU 资源. 参见 phoronix 报道 [英特尔 HFI 驱动程序可以“节省大量 CPU 周期”,只需在需要时才启用自身](https://www.phoronix.com/news/Intel-HFI-Enable-Disable). | v4 ☐☑✓ | [LORE v4,0/3](https://lore.kernel.org/all/20240223155942.60813-1-stanislaw.gruszka@linux.intel.com) |
| 2024/02/23 | Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> | [thermal/netlink/intel_hfi: Enable HFI feature only when required](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=b33f3d2677b8ddd7a3aba2b02497422a1d2c2a01) | 英特尔 HFI 驱动程序可以在需要时启用它, 从而"节省大量 CPU 周期". 仅在有用户空间使用者处于活动状态时启用它. 如果英特尔 Speed Select 或英特尔低功耗守护程序正在运行, 英特尔 HFI 接口将被激活, 但如果不是, 它将被禁用, 从而显然可以节省大量 CPU 资源. 参见 phoronix 报道 [英特尔 HFI 驱动程序可以“节省大量 CPU 周期”,只需在需要时才启用自身](https://www.phoronix.com/news/Intel-HFI-Enable-Disable) 以及 [](https://www.phoronix.com/news/Intel-HFI-Efficient-Linux-6.10) | v4 ☐☑✓ v6.10-rc1 | [LORE v4,0/3](https://lore.kernel.org/all/20240223155942.60813-1-stanislaw.gruszka@linux.intel.com) |
@@ -859,8 +859,19 @@ SLS 被认为是 Spectre 漏洞的变体, 但二者的攻击范围略有不同,
-------
## 4.3 branch history injection
-------
## 4.X 通用机制
[The "branch history injection" hardware vulnerability](https://lwn.net/Articles/969210)
[Linux Kernel Patched For Branch History Injection "BHI" Intel CPU Vulnerability](https://www.phoronix.com/news/Linux-BHI-Branch-History-Inject)
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:-----:|:----:|:----:|:----:|:------------:|:----:|
| 2024/04/05 | Josh Poimboeuf <jpoimboe@kernel.org> | [x86/bugs: Change commas to semicolons in 'spectre_v2' sysfs file](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=2bb69f5fc72183e1c62547d900f560d0e9334925) | TODO | v2 ☐☑✓ | [LORE](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2bb69f5fc72183e1c62547d900f560d0e9334925) |
## 4.X 安全框架层
-------
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
@@ -1017,6 +1028,16 @@ https://blogs.vmware.com/vsphere/2021/10/introducing-project-capitola.html
[Memory-management changes for CXL](https://lwn.net/Articles/931416)
#### 6.3.2.3 CXL Devices
-------
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:---:|:----:|:---:|:----:|:---------:|:----:|
| 2024/03/24 | ira.weiny@intel.com <ira.weiny@intel.com> | [DCD: Add support for Dynamic Capacity Devices (DCD)](https://lore.kernel.org/all/20240324-dcd-type2-upstream-v1-0-b7b00d623625@intel.com) | 动态容量设备 (DCD)(CXL 3.1 sec 9.13.3) 是一种 CXL 存储器设备, 它允许存储器容量动态变化, 而无需重置设备、重新配置 HDM 解码器或重新配置软件 DAX 区域. 动态容量最大的使用案例之一是允许主机在数据中心内动态共享内存, 而不增加每台主机连接的内存. 添加或删除内存的一般流程是让协调器协调内存的使用. 通常, 在这样的系统中有 5 个参与者, 即编排器、结构管理器、主机看到的设备、主机内核和主机用户. | v1 ☐☑✓ | [LORE v1,0/26](https://lore.kernel.org/all/20240324-dcd-type2-upstream-v1-0-b7b00d623625@intel.com) |
## 6.4 CPU IDLE(C-state)
-------
@@ -1032,17 +1053,26 @@ https://blogs.vmware.com/vsphere/2021/10/introducing-project-capitola.html
## 6.5 memory model
-------
### 6.5.1 barrier
-------
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:----:|:----:|:---:|:----:|:---------:|:----:|
| 2009/07/08 | Jiri Olsa <jolsa@redhat.com> | [memory barrier: adding smp_mb__after_lock](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ad46276952f1af34cd91d46d49ba13d347d56367) | TODO | v1 ☑✓ 2.6.31-rc3 | [LORE](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ad46276952f1af34cd91d46d49ba13d347d56367) |
| 2013/08/12 | Oleg Nesterov <oleg@redhat.com> | [sched: fix the theoretical signal_wake_up() vs schedule() race](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e0acd0a68ec7dbf6b7a81a87a867ebd7ac9b76c4) | 在 try_to_wake_up 路径引入了 smp_mb__before_spinlock(), 入口位置的 smp_wmb() 就被替换为 smp_mb__before_spinlock(). | v1 ☑✓ v3.11-rc6 | [LORE](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e0acd0a68ec7dbf6b7a81a87a867ebd7ac9b76c4) |
| 2017/08/02 | Peter Zijlstra <peterz@infradead.org> | [Getting rid of smp_mb__before_spinlock](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=ae813308f4630642d2c1c87553929ce95f29f9ef) | 本系列删除了 smp_mb_before_spinlock() 用户, 并将调度路径下转换为使用 smp_mb_after_spinlock(), 从而在相同数量的障碍下提供更多保障. | v1 ☑✓ 4.14-rc1 | [LORE v1,0/4](https://lore.kernel.org/all/20170802113837.280183420@infradead.org) |
| 2017/08/07 | Byungchul Park <byungchul.park@lge.com> | [lockdep: Implement crossrelease feature](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=ef0758dd0fd70b98b889af26e27f003656952db8) | 1502089981-21272-1-git-send-email-byungchul.park@lge.com | v8 ☑✓ 4.14-rc1 | [LORE v8,0/14](https://lore.kernel.org/all/1502089981-21272-1-git-send-email-byungchul.park@lge.com) |
| 2018/07/16 | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | [Updates to the formal memory model](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=71b7ff5ebc9b1d5aa95eb48d6388234f1304fd19) | NA | v1 ☑✓ 4.19-rc1 | [LORE v1,0/14](https://lore.kernel.org/all/20180716180540.GA14222@linux.vnet.ibm.com) |
### 6.5.3 内存一致性问题(memory consistency)
-------
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:----:|:----:|:---:|:----:|:---------:|:----:|
| 2018/07/16 | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | [Updates to the formal memory model](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=71b7ff5ebc9b1d5aa95eb48d6388234f1304fd19) | NA | v1 ☑✓ 4.19-rc1 | [LORE v1,0/14](https://lore.kernel.org/all/20180716180540.GA14222@linux.vnet.ibm.com) |
| 2024/04/10 | Zayd Qumsieh <zayd_qumsieh@apple.com> | [tso: aarch64: Expose TSO for virtualized linux on Apple Silicon](https://lore.kernel.org/all/20240410211652.16640-1-zayd_qumsieh@apple.com) | x86 CPU 使用 TSO 内存模型. Apple Silicon CPU 能够选择性地使用 TSO 内存模型. 这可以通过设置 ACTLR 来完成. TSOEN 位为 1. 此功能对 x86 仿真器非常有用, 因为它消除了仿真器插入内存屏障以遵守的需要. 通过 TSO 存储器模型. 此补丁系列将添加 ACTLR. TSOEN 支持 Apple Silicon 机器上的虚拟化 linux. 用户空间将能够使用 prctl 将 CPU 的内存模型从默认的 ARM64 内存模型更改为 TSO 内存模型. 可以使用一个简单的测试来确定 TSO 内存模型是否正在使用中. 这必须在 Apple Silicon MacOS Sonoma 14.4 版或更高版本上完成, 因为早期版本不支持修改 TSOEN 位. 用例程序参见 [TSOEnabler](https://github.com/saagarjha/TSOEnabler/blob/master/testtso/main.c), 如果 TSO 正在使用, 此程序将无限期挂起, 如果不使用, 则几乎立即崩溃. | v1 ☑✓ | [LORE v1,0/3](https://lore.kernel.org/all/20240410211652.16640-1-zayd_qumsieh@apple.com) |
## 6.6 objtool
-------
@@ -1061,6 +1091,9 @@ Rosetta 是一个转译过程, 允许用户在 Apple Silicon 上运行包含 x86
[macOS 13 Adding Ability To Use Rosetta In ARM Linux VMs For Speedy x86_64 Linux Binaries](https://www.phoronix.com/scan.php?page=news_item&px=macOS-13-Rosetta-Linux-Binaries)
## 6.8 原子操作
-------
@@ -1215,6 +1248,7 @@ AMD-pstate 驱动程序利用 ITMT 体系结构提供的功能和数据结构,
| 2023/08/29 | Tony Luck <tony.luck@intel.com> | [Add support for Sub-NUMA cluster (SNC) systems](https://lore.kernel.org/all/20230829234426.64421-1-tony.luck@intel.com) | [Intel Fixing Up Sub-NUMA Clustering For Linux So That It Behaves With RDT](https://www.phoronix.com/news/Intel-SNT-RDT-Fixing-Up) | v5 ☐☑✓ | [LORE v5,0/8](https://lore.kernel.org/all/20230829234426.64421-1-tony.luck@intel.com) |
| 2023/12/07 | Tony Luck <tony.luck@intel.com> | [x86/resctrl: mba_MBps enhancements](https://lore.kernel.org/all/20231207195613.153980-1-tony.luck@intel.com) | TODO | v6 ☐☑✓ | [LORE v6,0/3](https://lore.kernel.org/all/20231207195613.153980-1-tony.luck@intel.com) |
| 2024/02/13 | James Morse <james.morse@arm.com> | [x86/resctrl: monitored closid+rmid together, separate arch/fs locking](https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/log/?id=fb700810d30b9eb333a7bf447012e1158e35c62f) | [Improved Memory Bandwidth Throttling Behavior For Linux 6.9](https://www.phoronix.com/news/Linux-69-RAM-Bandwidth-Throttle) | v9 ☐☑✓ 6.9-rc1 | [LORE v9,0/24](https://lore.kernel.org/all/20240213184438.16675-1-james.morse@arm.com) |
| 2024/03/21 | James Morse <james.morse@arm.com> | [x86/resctrl: Move the resctrl filesystem code to /fs/resctrl](https://lore.kernel.org/all/20240321165106.31602-1-james.morse@arm.com) | TODO | v1 ☐☑✓ | [LORE v1,0/31](https://lore.kernel.org/all/20240321165106.31602-1-james.morse@arm.com) |
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -108,7 +108,7 @@
| 6.6 | [The first half of the 6.6 merge window](https://lwn.net/Articles/942954), [The rest of the 6.6 merge window](https://lwn.net/Articles/943245) | NA | NA |
| 6.7 | NA | NA | NA |
| 6.8 | [The first half of the 6.8 merge window](https://lwn.net/Articles/957188), [The rest of the 6.8 merge window](https://lwn.net/Articles/958178) | NA | NA |
| 6.9 | [The first half of the 6.9 merge window](https://lwn.net/Articles/965141), [Kernel prepatch 6.9-rc1](https://lwn.net/Articles/966525), [The rest of the 6.9 merge window](https://lwn.net/Articles/965541)
年终盘点
File diff suppressed because one or more lines are too long
+22 -13
View File
@@ -530,7 +530,6 @@ BPF verifiery 已经做了很多工作来尽量确保加载进 kernel 的 BPF pr
[An ioctl() call to detect memory writes](https://lwn.net/Articles/940704)
[BPF iterators for filesystems](https://lwn.net/Articles/937326)
[Exceptions in BPF](https://lwn.net/Articles/938435)
[Randomness for kmalloc()](https://lwn.net/Articles/938637)
[Beginning the software-interrupt lock pushdown](https://lwn.net/Articles/939973)
[Following up on file-position locking](https://lwn.net/Articles/940808)
[Out-of-memory victim selection with BPF](https://lwn.net/Articles/941614)
@@ -597,21 +596,31 @@ BPF verifiery 已经做了很多工作来尽量确保加载进 kernel 的 BPF pr
Skip idle CPU search on busy system
Skip cpus with no sched domain attach
https://lore.kernel.org/all/20240220225622.2626569-1-qyousef@layalina.io/
[A Fix Is On The Way For A Previously-Reported Linux 5.18 Performance Regression](https://www.phoronix.com/news/Linux-5.18-NUMA-Regression-Fix)
Rotary Interactivity Favor Scheduler Version 3(Brain-Eating) Update.
https://lore.kernel.org/all/CANQmPXgdaiSUV89Vk_xR3dRAyKeGK6x=CJwaSLTC_gv_ocNP1A@mail.gmail.com/
https://lore.kernel.org/all/20100911173732.551632040@efficios.com/
https://lore.kernel.org/all/20231116105425.84773-1-s921975628@gmail.com/
https://lore.kernel.org/all/20231215052652.917741-1-imran.f.khan@oracle.com/
https://lore.kernel.org/all/20240115105052.398761-1-khorenko@virtuozzo.com/
https://lore.kernel.org/all/20231215130501.24542-1-anna-maria@linutronix.de/
cba6167f0adb
[[LSF/MM/BPF TOPIC] TAO: THP Allocator Optimizations](https://lore.kernel.org/all/20240229183436.4110845-1-yuzhao@google.com) 致力于使透明大页面的分配尽可能高效.
| 2023/09/29 | Kees Cook <keescook@chromium.org> | [`chelsio: Annotate structs with __counted_by`](https://lore.kernel.org/all/20230929181042.work.990-kees@kernel.org) | TODO | v1 ☐☑✓ | [LORE v1,0/5](https://lore.kernel.org/all/20230929181042.work.990-kees@kernel.org) |
| 2023/10/25 | Steven Rostedt <rostedt@goodmis.org> | [sched: Extended Scheduler Time Slice](https://lore.kernel.org/all/20231025235413.597287e1@gandalf.local.home) | TODO | v2 ☐☑✓ | [LORE v1](https://lore.kernel.org/all/20231025054219.1acaa3dd@gandalf.local.home)[LORE v2](https://lore.kernel.org/all/20231025235413.597287e1@gandalf.local.home) |
| 2023/10/31 | Keisuke Nishimura <keisuke.nishimura@inria.fr> | [sched/fair: Fix the decision for load balance](https://lore.kernel.org/all/20231031133821.1570861-1-keisuke.nishimura@inria.fr) | TODO | v3 ☐☑✓ | [LORE](https://lore.kernel.org/all/20231031133821.1570861-1-keisuke.nishimura@inria.fr) |
| 2024/03/04 | Christian Loehle <christian.loehle@arm.com> | [Introduce per-task io utilization boost](https://lore.kernel.org/all/20240304201625.100619-1-christian.loehle@arm.com) | TODO | v1 ☐☑✓ | [LORE v1,0/2](https://lore.kernel.org/all/20240304201625.100619-1-christian.loehle@arm.com) |
| 2023/11/30 | Valentin Schneider <vschneid@redhat.com> | [sched/fair: Delay throttling to kernel exit](https://lore.kernel.org/all/20231130161245.3894682-1-vschneid@redhat.com) | TODO | v1 ☐☑✓ | [LORE v1,0/2](https://lore.kernel.org/all/20231130161245.3894682-1-vschneid@redhat.com) |
| 2024/03/24 | Qais Yousef <qyousef@layalina.io> | [sched: Don't trigger misfit if affinity is restricted](https://lore.kernel.org/all/20240324004552.999936-1-qyousef@layalina.io) | TODO | v8 ☐☑✓ | [LORE v8,0/4](https://lore.kernel.org/all/20240324004552.999936-1-qyousef@layalina.io) |
| 2024/04/11 | Kyle Huey <me@kylehuey.com> | [Combine perf and bpf for fast eval of hw breakpoint conditions](https://lore.kernel.org/all/20240412015019.7060-1-khuey@kylehuey.com) | TODO | v6 ☐☑✓ | [LORE v6,0/7](https://lore.kernel.org/all/20240412015019.7060-1-khuey@kylehuey.com) |
| 2024/04/07 | Ingo Molnar <mingo@kernel.org> | [sched: Split out kernel/sched/fair_balance.c, numa_balancing.c and syscalls.c, plus other updates](https://lore.kernel.org/all/20240407084319.1462211-1-mingo@kernel.org) | TODO | v1 ☐☑✓ | [LORE v1,0/5](https://lore.kernel.org/all/20240407084319.1462211-1-mingo@kernel.org) |
| 2023/05/09 | Kristina Martsenko <kristina.martsenko@arm.com> | [arm64: Support for Armv8.8 memcpy instructions in userspace](https://lore.kernel.org/all/20230509142235.3284028-1-kristina.martsenko@arm.com) | Armv8.8 扩展添加了执行 memcpy()、memset() 和 memmove() 操作 (FEAT_MOPS). 此系列增加了对的支持使用用户空间中的新指令. | v8 ☐☑✓ | [LORE v8,0/11](https://lore.kernel.org/all/20230509142235.3284028-1-kristina.martsenko@arm.com) |
| 2023/09/15 | Kristina Martsenko <kristina.martsenko@arm.com> | [KVM: arm64: Support for Arm v8.8 memcpy instructions in KVM guests](https://lore.kernel.org/all/20230915124840.474888-1-kristina.martsenko@arm.com) | TODO | v8 ☐☑✓ | [LORE v8,0/3](https://lore.kernel.org/all/20230915124840.474888-1-kristina.martsenko@arm.com) |
ZONE_NOSPLIT 将防止大页面的拆分, 其中连续的页面块不能拆分到给定大小以下, 它的存在是为了帮助系统维护大块内存(用于透明的大页面等), 这将使内核不必在以后重新组装它们, 而不必经历持续的压缩过程.
ZONE_NOMERGE 具有最小块大小属性, 但也不允许将页面块合并为更大的组; 因此, 它只能容纳单一大小的块. 为内核创建接近第二个本机页面大小的内容, 使较大的页面在有意义的情况下可用, 同时仍保持较小的页面可用.
从某种意义上说, 这项工作可以看作是那些希望看到 Linux 整体使用更大页面大小的人和那些担心相关的内部碎片成本的人之间的一种妥协.
但是, 对于透明大页, 内部碎片仍然是一个问题; 进程可能分配了这样的页面, 但只使用其中的一小部分内存. 当前的内核将尝试通过将大页面拆分回基本页面来应对这种情况, 从而允许将未使用的部分重新分配到其他地方.
位于 (或更高) ZONE_NOSPLIT 的页面显然不会发生拆分; 这正是 Zone 存在要强制执行的策略. 取而代之的是, 赵的补丁集引入了 "粉碎(shattering)" 大页面的概念. 如果页面被破坏, 其内容将被迁移(复制) 到位于合适区域的较小页面; 一旦该过程完成, 可以将保持完整的原始大页面分配给其他用途. 粉碎比分割(splitting)更昂贵; Yu Zhao 认为, 对于未正确使用其内存的进程来说, 这是一个适当的成本; "在零售术语中, 购买的退货需要支付进货费, 原始商品可以转售".
另一个声称的 ZONE_NOMERGE 优点是它促进了巨大的 vmemmap 优化 (HVO), 这在 2020 年已经介绍过了. 简而言之, 这个技巧允许内核恢复用于保存 page 大页面中许多页面结构的内存. 在使用大量大页面的系统中, 这种优化可以节省大量内存. 在当前的内核中, HVO 只能与 hugetlbfs 机制一起使用, 该机制不透明, 通常只在特殊情况下使用. ZONE_NOMERGE 但是, 页面被组织在固定块中, 就像 hugetlbfs 页面一样, 因此很容易将 HVO 与它们一起使用.
lag_i = S - s_i = w_i \times (V - v_i) = w_i \times [\frac{\sum \limits_{0}^{n}w_{i} \times (v_{i} - v_{0})}{W} + v_{0} - v_i] = w_i \times [\frac{\sum \limits_{0}^{n}w_{i} \times (v_{i} - v_{0})}{W} - (v_{i} - v_0)] > 0
+6
View File
@@ -75,6 +75,8 @@ systrace, perfetto, drgn, systemtep
[All my favorite tracing tools: eBPF, QEMU, Perfetto, new ones I built and more](https://thume.ca/2023/12/02/tracing-methods) 将 eBPF 跟踪与 Perfetto 可视化相结合, 通过使用一些巧妙的技巧来诊断大量跟踪中的尾部延迟问题.
[Perfetto数据流架构故障分析:带你研究 trace 为何丢失](https://blog.csdn.net/feelabclihu/article/details/136266302)
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:----:|:----:|:---:|:----:|:---------:|:----:|
| 2019/05/29 | Sandoval @ Facebook | [A kernel debugger in Python: drgn](https://lwn.net/Articles/789641) | 一款 kernel 调试器, 可以利用 Python 脚本来访问正在运行的 kernel 里的数据结构<br>Drgn 在 [LSFMM2019](https://lwn.net/Articles/lsfmm2019) 被公开, LWN 随即进行了报道 [A kernel debugger in Python: drgn](https://lwn.net/Articles/789641), 随后 [2021 年报道](https://lwn.net/Articles/878309/)了 [drgn: How the Linux Kernel Team at Meta Debugs the Kernel at Scale (Meta)](https://developers.facebook.com/blog/post/2021/12/09/drgn-how-linux-kernel-team-meta-debugs-kernel-scale), Meta 的内核团队使用了 Drgn 跟踪内核中出现的问题, 并贡献了非常分布的用例集合. | ☐ | [Github](https://github.com/osandov/drgn), [User Guide](https://drgn.readthedocs.io/en/latest/user_guide.html), [BPF drgn tools](https://www.kernel.org/doc/html/latest/bpf/drgn.html) |
@@ -99,6 +101,10 @@ Intel 发布的 ControlFlag 用机器学习来发现代码中的错误, 支持 C
|:----:|:----:|:---:|:----:|:---------:|:----:|
| 2019/05/29 | Alex Feng <lifeng1519@gmail.com> | Kernel Visualization Tool | 该工具用于分析 Linux/Solaris/BSD 内核指定流程的调用关系链, 并绘制特定函数的调用图,帮助开发者理解代码. | ☐ | [Kernel Visualization Tool](https://github.com/x2c3z4/kernel_visualization) |
* Dtrace
[Oracle Releases DTrace 2.0.0-1.14 For Linux Systems](https://www.phoronix.com/news/D-Trace-2.0.0-1.14)
## 2.2 call kernel func from userspace
-------
+8
View File
@@ -246,6 +246,14 @@ Anbox 使用 Linux 命名空间 (user, pid, uts, net, mount, ipc) 在容器中
| 2024/02/26 | Lai Jiangshan <jiangshanlai@gmail.com> | [KVM: x86/PVM: Introduce a new hypervisor](https://lore.kernel.org/all/20240226143630.33643-1-jiangshanlai@gmail.com) | [PVM Virtualization Framework Proposed For Linux - Built Atop The KVM Hypervisor](https://www.phoronix.com/news/PVM-Hypervisor-Linux-RFC) | v1 ☐☑✓ | [LORE v1,0/73](https://lore.kernel.org/all/20240226143630.33643-1-jiangshanlai@gmail.com) |
# 12 HaltPolling
-------
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:---:|:----:|:---:|:----:|:---------:|:----:|
| 2024/02/15 | Mihai Carabas <mihai.carabas@oracle.com> | [Enable haltpoll for arm64](https://lore.kernel.org/all/1707982910-27680-1-git-send-email-mihai.carabas@oracle.com) | 这个补丁集允许在arm64上使用haltpoll-governer. 通过减少IPC延迟. openEuler 有类似的方案, 参见 [最佳实践](https://docs.openeuler.org/zh/docs/20.09/docs/Virtualization/最佳实践.html#halt-polling) 以及 [漫话Linux之“躺平”: IDLE 子系统](https://mp.weixin.qq.com/s?__biz=Mzg2OTc0ODAzMw==&mid=2247502695&idx=1&sn=60f6132f5f4f1d0f515cad74e83b3c63&source=41). | v4 ☐☑✓ | [LORE](https://lore.kernel.org/all/1707982910-27680-1-git-send-email-mihai.carabas@oracle.com) |
<br>