diff --git a/study/arch/MicroArchitecture/README.md b/study/arch/MicroArchitecture/README.md
index 0b568e9..1cab4b9 100644
--- a/study/arch/MicroArchitecture/README.md
+++ b/study/arch/MicroArchitecture/README.md
@@ -33,8 +33,13 @@ blogexcerpt: 虚拟化 & KVM 子系统
+# 1 SMT(Simultaneous Multithreading)
+-------
-# 1 Rentable Units
+1995 年 [Proceedings of the 22rd Annual International Symposium on Computer Architecture, Santa Margherita Ligure, Italy, June 1995.](https://dada.cs.washington.edu/smt/papers/isca95abstract.html) 的论文 [Simultaneous Multithreading: Maximizing On-Chip Parallelism](https://dada.cs.washington.edu/smt/papers/isca95abstract.html) 首次提出同步多线程 SMT 的设计.
+
+
+# 2 Rentable Units
-------
@@ -61,7 +66,7 @@ Rentable Unit 根据任务调度 P 核和 E 核, 确保所有核心都处于活
-# 2 ON-DEMAND MEMORY ALLOCATION
+# 3 ON-DEMAND MEMORY ALLOCATION
-------
@@ -69,7 +74,7 @@ Apple [专利号-WO2021US19353-Apple-ON-DEMAND MEMORY ALLOCATION](https://xueshu
-# 3 一些微架构的探索
+# 4 一些微架构的探索
-------
[The Forward Slice Core Microarchitecture](https://dl.acm.org/doi/10.1145/3410463.3414629)
@@ -86,11 +91,34 @@ Apple [专利号-WO2021US19353-Apple-ON-DEMAND MEMORY ALLOCATION](https://xueshu
+# 5 业界比赛/会议
+-------
+
+## 5.1 竞赛
+-------
+
+| 竞赛 | 描述 |
+|:---:|:----:|
+| [Data Prefetching Championship](https://dpc3.compas.cs.stonybrook.edu) | 数据预取锦标赛, 目标是在一个通用框架中比较不同的数据预取算法. L1、L2 和 L3 数据缓存的预取器必须在竞争规则中指定的固定存储预算内实施. 参赛作品将根据组委会提供的框架在一系列基准上的表现进行评估. [3rd 属于](https://dpc3.compas.cs.stonybrook.edu) |
+| [Instruction Prefetching Championship (IPC1)](https://research.ece.ncsu.edu/ipc/welcome) | 指令预取算法竞赛, 目标是在一个通用框架中比较不同的指令预取算法. L1 指令缓存的预取器必须在竞争规则中指定的固定存储预算内实现. 参赛作品将根据组委会提供的框架在一系列基准上的表现进行评估. |
+## 5.2 会议
+-------
+| 竞赛 | 描述 |
+|:---:|:----:|
+| [International Symposium on Computer Architecture (ISCA)](https://dblp.uni-trier.de/db/conf/isca/index.html) | NA |
+| International Symposium on Microarchitecture (MICRO) | NA |
+| International Symposium on High-Performance Computer Architecture (HPCA) | NA |
+| International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS) | NA |
+| ACM Transactions on Computer Systems (TOCS) | NA |
+| ACM Transactions on Architecture and Code Optimization (TACO) | NA |
+| IEEE Transactions on Computers (TC) | NA |
+| IEEE Transactions on Parallel and Distributed Systems (TPDS) | NA |
+| IEEE Micro Magzine (IEEE Micro) | NA |
diff --git a/study/arch/topdown/README.md b/study/arch/topdown/README.md
index dd78631..bf76c79 100644
--- a/study/arch/topdown/README.md
+++ b/study/arch/topdown/README.md
@@ -260,9 +260,18 @@ sudo perf stat -M TopDownL1 sleeep 1
| Level 1 | [Retring](https://elixir.bootlin.com/linux/v5.13/source/tools/perf/pmu-events/arch/arm64/hisilicon/hip08/metrics.json#L17) | retired 的 uOps 数量占所有 pipeline slots 的比重, 理想情况下, 我们希望看到所有的 pipeline slots 都能归属于 Retiring, 因为它与 IPC 相关. | INST_RETIRED / (4 * CPU_CYCLES) |
+# 4 业界 TOP-DOWN 工具
+-------
+
+| 编号 | 工具 | 描述 | 链接 |
+|:---:|:---:|:----:|:----:|
+| 1 | [Intel pmu-tools](https://github.com/andikleen/pmu-tools) | pmu-tools 是一系列工具和库, 用于在 Linux 性能之上的 Intel CPU 上进行配置文件收集和性能分析. 这其中包含了 Intel 提供的 TOP-DOWN 分析工具 [toplev](https://github.com/andikleen/pmu-tools/wiki/toplev-manual). | [Top-down Microarchitecture Analysis Method](https://www.intel.com/content/www/us/en/docs/vtune-profiler/cookbook/2023-0/top-down-microarchitecture-analysis-method.html) |
+| 2 | [Arm Telemetry Solution](https://gitlab.arm.com/telemetry-solution/telemetry-solution) | Linaro_Connect_2023, [Introduction to Arm Telemetry Solution & Performance Analysis Methodology](https://static.sched.com/hosted_files/linaroconnect2023/a9/Arm_Telemetry_Solution_Linaro_Connect_2023_Jumana_Mundichipparakkal.pdf) Arm Topdown Methodology 分析的工具集. 请参阅 Arm Neoverse V1 性能分析方法白皮书< Arm Neoverse V1 Performance Analysis Methodology whitepaper>](https://armkeil.blob.core.windows.net/developer/Files/pdf/white-paper/neoverse-v1-core-performance-analysis.pdf), 了解 Neoverse V1 处理器支持的 Arm Topdown 方法. | [安谋科技(Arm China)马闯: Arm 架构下性能分析与优化介绍](https://developer.aliyun.com/article/1358264), [知乎-阿比王-ARM平台性能分析: 安装ARM Topdown工具集](https://zhuanlan.zhihu.com/p/700998204), [Perf on Arm](https://zhuanlan.zhihu.com/p/671540004), [Arm Neoverse V1 – Top-down Methodology for Performance Analysis & Telemetry Specification](https://community.arm.com/arm-community-blogs/b/infrastructure-solutions-blog/posts/arm-neoverse-v1-top-down-methodology). |
-# 1 参考资料
+
+
+# 4 参考资料
-------
| 编号 | 链接 | 描述 |
diff --git a/study/kernel/00-DESCRIPTION/AI.md b/study/kernel/00-DESCRIPTION/AI.md
new file mode 100644
index 0000000..6cc7141
--- /dev/null
+++ b/study/kernel/00-DESCRIPTION/AI.md
@@ -0,0 +1,91 @@
+---
+
+title: AI
+date: 2021-02-15 00:32
+author: gatieme
+tags:
+ - linux
+ - tools
+categories:
+ - 技术积累
+thumbnail:
+blogexcerpt: 虚拟化 & KVM 子系统
+
+---
+
+
+
+本作品采用 知识共享署名 - 非商业性使用 - 相同方式共享 4.0 国际许可协议 进行许可, 转载请注明出处, 谢谢合作
+
+
+
+因本人技术水平和知识面有限, 内容如有纰漏或者需要修正的地方, 欢迎大家指正, 鄙人在此谢谢啦
+
+** 转载请务必注明出处, 谢谢, 不胜感激 **
+
+
+
+| 日期 | 作者 | GitHub| CSDN | BLOG |
+| ------- |:-------:|:-------:|:-------:|:-------:|
+| 2021-02-15 | [成坚 - gatieme](https://kernel.blog.csdn.net) | [`AderXCoding/system/tools/fzf`](https://github.com/gatieme/AderXCoding/tree/master/system/tools/fzf) | [使用模糊搜索神器 FZF 来提升办公体验](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)|
+
+
+
+
+2 ** AI OS **
+=====================
+
+
+
+
+**-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 重要功能和时间点 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-***
+
+
+
+
+
+下文将按此目录分析 Linux 内核中 MM 的重要功能和引入版本:
+
+
+
+
+**-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 正文 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-***
+
+
+
+# 1 自动化故障定位、修复和分析
+-------
+
+| 论文 | 描述 |
+|:---:|:----:|
+| [A Unified Debugging Approach via LLM-Based Multi-Agent Synergy](https://arxiv.org/abs/2404.17153) | 大型语言模型 (LLM) 在自动调试方面显示出了巨大潜力. 然而, 我们发现传统和基于 LLM 的调试工具面临着三个挑战:1)故障定位的上游不完美会影响下游的修复; 2)处理复杂逻辑错误的不足; 3)忽略程序上下文. 作者提出了第一个自动化的、统一的调试框架——FixAgent, 通过 LLM 代理协同作用. FixAgent 可以执行端到端的故障定位、修复和分析. LLM 可以从人类开发人员在调试中认可的通用软件工程原则中受益, 如 rubber duck debugging, 从而更好地理解程序功能和逻辑错误. 因此, 我们创建了三个受 rubber duck debugging 启发的设计来解决这些挑战. 它们是代理专业化和协同作用、关键变量跟踪和程序上下文理解, 这些要求 LLM 提供明确的解释, 并迫使它们关注关键的程序逻辑信息. 在广泛使用的 QuixBugs 数据集上的实验表明, FixAgent 正确修复了 80 个中的 79 个错误, 其中有 9 个以前从未被修复过. 即使没有故障位置信息和少于 0.6% 的采样时间, 它也比 CodeFlaws 上表现最佳的修复工具更可信地修补了 1.9 倍的缺陷. 平均而言, FixAgent 相对于使用不同 LLM 的基础模型平均增加了约 20% 的可信和正确的修复, 显示出我们设计的有效性. 此外, FixAgent 的正确率达到了惊人的 97.26%, 表明 FixAgent 有可能克服现有方法的过度拟合问题. |
+
+
+
+# 2 AI-OS
+-------
+
+| 论文 | 描述 |
+|:---:|:----:|
+| [LLM as OS, Agents as Apps: Envisioning AIOS, Agents and the AIOS-Agent Ecosystem](https://arxiv.org/abs/2312.03815) | 本文设想了一个革命性的 AIOS-Agent 生态系统, 其中大型语言模型 (LLM) 充当 (人工) 智能操作系统 (IOS, 或 AIOS)——一个 "有灵魂" 的操作系统. 在此基础上, 开发了各种 LLM 基于 AI 代理的应用程序(Agents, 或 AAP), 丰富了 AIOS-Agent 生态系统, 标志着传统 OS-APP 生态系统的范式转变. 作者设想 LLM 其影响将不仅限于人工智能应用层面, 相反, 它将彻底改变计算机系统、架构、软件和编程语言的设计和实现, 其特点是几个主要概念: LLM 操作系统(系统级)、代理即应用程序(应用程序级)、自然语言作为编程接口(用户级) 和工具即设备 / 库(硬件 / 中间件级). 我们首先介绍传统操作系统的架构. 然后, 我们通过 "LLMas OS(LLMOS)" 正式化 AIOS 的概念框架, 将 AIOS 与传统操作系统进行类比: LLM 将上下文窗口比作操作系统内核, 将上下文窗口比作内存, 将外部存储比作文件系统, 将硬件工具比作外围设备, 将软件工具比作编程库, 将用户提示比作用户命令. 随后, 我们引入了新的 AIOS-Agent 生态系统, 用户可以使用自然语言轻松编程 Agent 应用程序(AAP), 使软件开发民主化, 这与传统的 OS-APP 生态系统不同. 在此之后, 我们将探索代理应用程序的多样化范围. 我们深入研究了单智能体和多智能体系统, 以及人机交互. 最后, 借鉴传统 OS-APP 生态的洞察, 提出了 AIOS-Agent 生态演进的路线图. 该路线图旨在指导未来的研究和开发, 建议 AIOS 及其代理应用程序的系统性进展. |
+
+# 3 AI-IN-OS
+-------
+
+
+
+
+
+
+
+
+
+
+* 本作品 / 博文 ([AderStep - 紫夜阑珊 - 青伶巷草 Copyright ©2013-2017](http://blog.csdn.net/gatieme) ), 由 [成坚 (gatieme)](http://blog.csdn.net/gatieme) 创作.
+
+* 采用
知识共享署名 - 非商业性使用 - 相同方式共享 4.0 国际许可协议 进行许可. 欢迎转载、使用、重新发布, 但务必保留文章署名 [成坚 gatieme](http://blog.csdn.net/gatieme) (包含链接: http://blog.csdn.net/gatieme), 不得用于商业目的.
+
+* 基于本文修改后的作品务必以相同的许可发布. 如有任何疑问, 请与我联系.
+
+* ** 转载请务必注明出处, 谢谢, 不胜感激 **
+
diff --git a/study/kernel/00-DESCRIPTION/ARCH.md b/study/kernel/00-DESCRIPTION/ARCH.md
index fa998cb..8a9e752 100644
--- a/study/kernel/00-DESCRIPTION/ARCH.md
+++ b/study/kernel/00-DESCRIPTION/ARCH.md
@@ -468,7 +468,7 @@ SGX 旨在以硬件安全为强制性保障, 不依赖于固件和软件的安
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:----:|:----:|:---:|:----:|:---------:|:----:|
| 2021/11/10 | Brijesh Singh | [Add AMD Secure Nested Paging (SEV-SNP) Guest Support](https://patchwork.kernel.org/project/linux-mm/cover/20211110220731.2396491-1-brijesh.singh@amd.com) | Guest 支持 AMD SEV SNP. | v7 ☐ | [Patchwork v7,00/45](https://patchwork.kernel.org/project/linux-mm/cover/20211110220731.2396491-1-brijesh.singh@amd.com) |
-| 2022/09/29 | Quan Nguyen | [Add Ampere's Altra SMPro MFD and its child drivers](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=4e6104b1e70020ad500f0fab7238898dd2ea2a38) | [Hardware Monitoring Driver Updates Land In Linux 6.2](https://www.phoronix.com/news/Linux-6.2-HWMON) | v9 ☐☑✓ 6.2 | [LORE v9,0/9](https://lore.kernel.org/all/20220929094321.770125-1-quan@os.amperecomputing.com) |
+| 2022/09/29 | Quan Nguyen | [Add Ampere's Altra SMPro MFD and its child drivers](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=4e6104b1e70020ad500f0fab7238898dd2ea2a38) | [Hardware Monitoring Driver Updates Land In Linux 6.2](https://www.phoronix.com/news/Linux-6.2-HWMON) 和 [Hardware Monitoring Improvements Submitted For Linux 6.11](https://www.phoronix.com/news/Linux-6.11-HWMON). | v9 ☐☑✓ 6.2 | [LORE v9,0/9](https://lore.kernel.org/all/20220929094321.770125-1-quan@os.amperecomputing.com) |
## 1.9 Software Defined Silicon
-------
@@ -716,6 +716,14 @@ TLB entry shootdown 常常或多或少的带来一些性能问题.
| 2023/01/16 | Mark Brown | [arm64/sme: Support SME 2 and SME 2.1](https://lore.kernel.org/all/20221208-arm64-sme2-v4-0-f2fa0aef982f@kernel.org) | Arm 最近发布了 SME 扩展的版本 2 和 2.1. SME 2 引入的特征之一是一些新的体系结构状态, 即 ZT0 寄存器. 本系列增加了对这一功能以及新 SME 版本的所有其他功能的支持. | v4 ☐☑✓ | [LORE v4,0/21](https://lore.kernel.org/all/20221208-arm64-sme2-v4-0-f2fa0aef982f@kernel.org) |
+### 2.3.4 FEAT_MOPS
+-------
+
+| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
+|:----:|:----:|:---:|:----:|:---------:|:----:|
+| 2023/05/09 | Kristina Martsenko | [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 | [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) |
+
## 2.4 pseudo-NMI
-------
@@ -1320,14 +1328,23 @@ AMD-pstate 驱动程序利用 ITMT 体系结构提供的功能和数据结构,
## 6.14 Cache 带宽管控
-------
+
+### 6.14.1 Intel RDT
+-------
+
+[`intel-cmt-cat`](https://github.com/intel/intel-cmt-cat)
+
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:---:|:----:|:---:|:----:|:---------:|:----:|
-| 2023/08/29 | Tony Luck | [Add support for Sub-NUMA cluster (SNC) systems](https://lore.kernel.org/all/20230829234426.64421-1-tony.luck@intel.com) | Add support for Sub-NUMA cluster (SNC) systems](https://lore.kernel.org/all/20240528222006.58283-1-tony.luck@intel.com) | 英特尔推出了一个大型的 Linux 内核补丁系列, 以改进 Sub-NUMA 集群 "SNC" 支持, 使其在现代英特尔硬件上与英特尔资源总监技术(RDT) 配合良好. SNC 将 CPU 内核/缓存/内存拆分为多个 NUMA 域有助于提高 NUMA 感知工作负载的性能. 参见 phoronix 报道 [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)
*-*-*-*-*-*-*-*
[LORE v19,0/20](https://lore.kernel.org/all/20240528222006.58283-1-tony.luck@intel.com) |
+| 2023/08/29 | Tony Luck | [Add support for Sub-NUMA cluster (SNC) systems](https://lore.kernel.org/all/20230829234426.64421-1-tony.luck@intel.com) | Add support for Sub-NUMA cluster (SNC) systems](https://lore.kernel.org/all/20240528222006.58283-1-tony.luck@intel.com) | 英特尔推出了一个大型的 Linux 内核补丁系列, 以改进 Sub-NUMA 集群 "SNC" 支持, 使其在现代英特尔硬件上与英特尔资源总监技术(RDT) 配合良好. SNC 将 CPU 内核/缓存/内存拆分为多个 NUMA 域有助于提高 NUMA 感知工作负载的性能. 参见 phoronix 报道 [Intel Fixing Up Sub-NUMA Clustering For Linux So That It Behaves With RDT](https://www.phoronix.com/news/Intel-SNT-RDT-Fixing-Up) 和 [Intel Sub-NUMA Clustering Will Stop Clashing With Resource Director On Linux 6.11+](https://www.phoronix.com/news/Intel-SNC-RDT-Behaves-Linux-611). | v5 ☐☑✓ | [LORE v5,0/8](https://lore.kernel.org/all/20230829234426.64421-1-tony.luck@intel.com)
*-*-*-*-*-*-*-*
[LORE v19,0/20](https://lore.kernel.org/all/20240528222006.58283-1-tony.luck@intel.com) |
| 2023/12/07 | Tony Luck | [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 | [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 | [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) |
+### 6.14.2 ARM MPAM
+-------
+
diff --git a/study/kernel/00-DESCRIPTION/DEBUGGING.md b/study/kernel/00-DESCRIPTION/DEBUGGING.md
index 32e29b4..c319e10 100644
--- a/study/kernel/00-DESCRIPTION/DEBUGGING.md
+++ b/study/kernel/00-DESCRIPTION/DEBUGGING.md
@@ -509,7 +509,10 @@ bperf 试图通过允许多个 "周期" 或 "指令" 的 perf_event (在不同
| 2021/07/20 | kan.liang@linux.intel.com | [perf: Save PMU specific data in task_struct](https://lore.kernel.org/all/1626788420-121610-1-git-send-email-kan.liang@linux.intel.com) | 某些特定于 PMU 的数据必须在上下文切换期间保存 / 恢复, 例如 LBR 调用堆栈数据. 目前, 数据保存在事件上下文结构中, 但仅针对每个流程的事件. 对于系统范围的事件, 由于上下文切换后缺少 LBR 调用堆栈数据, 与按进程模式相比, LBR 调用栈总是更短. | v6 ☐☑✓ | [LORE v6,0/6](https://lore.kernel.org/all/1626788420-121610-1-git-send-email-kan.liang@linux.intel.com) |
+## 11.11 WindowsPerf
+-------
+[技术分享 | 发布WindowsPerf:用于Windows on Arm的开源性能分析工具](https://mp.weixin.qq.com/s?__biz=MzIwOTYyMjQzOQ==&mid=2247507803&idx=1&sn=16ad97e99a0cb77bad2d9e460a166e85&chksm=97739b93a0041285052512b86886f5b613cf8bb2924f3a8d7b3007325e780c66f70beb7d2037&scene=27)
# 12 KPROBE
-------
@@ -778,6 +781,7 @@ Mesa CI 开始使用 Mold 作为其 x86_64 和 AArch64 上的默认链接器,
[Mold Linker Performance Remains Very Compelling In 2024 Over GNU Gold/ld, LLVM lld](https://www.phoronix.com/news/Mold-Linker-2024-Performance).
+Mold 链接器中添加了一个新的 "--separate-debug-file" 选项, 以实现"更快"的性能. 将包含调试信息的 Clang 链接可以下降到不到半秒, 而目前只有六秒半. [Mold Linker Gains New Option To Deliver "Massively Faster" Performance](https://www.phoronix.com/news/Mold-Separate-Debug-File).
### 13.8.2 dynamic linking
-------
@@ -849,13 +853,25 @@ Intel 编译器随后也切到 LLVM 框架, 参见 [Intel Fully Embracing LLVM F
| 2023/04/28 | Hou Wenlong | [x86/pie: Make kernel image's virtual address flexible](https://lore.kernel.org/all/cover.1682673542.git.houwenlong.hwl@antgroup.com) | 这些补丁允许 x86_64 上将内核构建为位置独立可执行文件(PIE). PIE 内核可以被重新定位在虚拟地址空间的顶部 2G 之下. 这个补丁集提供了一个例子, 允许内核映像在地址空间的顶部 512G 中重新定位. PIE 内核的最终目的是提高内核的安全性, 以及内核映像的虚拟地址的可扩展性, 甚至可以在地址空间的下半部分. 内核可以容纳更多的位置, 这意味着攻击者可以更难猜测. 参见 phoronix 报道 [New Patches Aim To Tackle Linux x86_64 PIE Support](https://www.phoronix.com/news/Linux-x86_64-PIE-2023). | v1 ☐☑✓ | [LORE v1,0/43](https://lore.kernel.org/all/cover.1682673542.git.houwenlong.hwl@antgroup.com) |
-## 13.13 Scope Guard
+## 13.13 语言/编译器级新特性支持
+
+### 13.13.1 Scope Guard
-------
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:---:|:----:|:---:|:----:|:---------:|:----:|
| 2023/06/12 | Peter Zijlstra | [Scope-based Resource Management](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=7170509cadbb76e5fa7d7b090d2cbdb93d56a2de) | [Scope-based resource management for the kernel](https://lwn.net/Articles/934679) 以及 [Scope-Based Resource Management Infrastructure Merged For Linux 6.5](https://www.phoronix.com/news/Linux-6.5-Scope-Resource-Manage). | v3 ☐☑✓ 6.6-rc1 | [LORE v3,0/57](https://lore.kernel.org/all/20230612090713.652690195@infradead.org) |
+### 13.13.2 变长数组 (flexible array) 与 `__counted_by`
+-------
+
+
+| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
+|:---:|:----:|:---:|:----:|:---------:|:----:|
+| 2024/07/20 | Gustavo A. R. Silva | [cxgb3/l2t: Fix undefined behaviour](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76497732932f15e7323dc805e8ea8dc11bb587cf) | Silva 提出了一系列旨在提高灵活数组使用安全性的措施, 包括:
引入 `__counted_by` 宏来注解结构体中的变长数组, 以帮助编译器进行边界检查.
提升编译器警告级别, 以捕捉零长度数组的使用, 尤其是那些可能被误解为灵活数组的情况.
集成测试到自动测试机器人中, 以捕获对类型转换的不当使用, 类似于在 atomic_t 转换为 recount_t 时所做的. 参见 [LWN, 2022/09/22, Safer flexible arrays for the kernel](https://lwn.net/Articles/908817) 和 [How to use the new counted_by attribute in C (and Linux)](https://people.kernel.org/gustavoars/how-to-use-the-new-counted_by-attribute-in-c-and-linux). | v1 ☐☑✓ v5.2-rc1 | [LORE](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76497732932f15e7323dc805e8ea8dc11bb587cf) |
+| 2023/05/17 | Kees Cook | [Compiler Attributes: Add `__counted_by` macro](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dd06e72e68bcb4070ef211be100d2896e236c8fb) | 引入一个新的编译器属性宏 `__counted_by`. 这个宏的目的是为了标注结构体中变长数组 (flexible array members) 成员的运行时大小信息, 这将有助于在未来的 GCC 和 Clang 编译器中利用新的 element_count 属性(这个新属性在 [Clang 17](https://reviews.llvm.org/D148381) 以及 [GCC 15](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896) 中支持.), 它将允许像 CONFIG_UBSAN_BOUNDS 和 CONFIG_FORTIFY_SOURCE 这样的内核特性在运行时对未知大小的变长数组进行边界检查.
尽管这个属性还在开发阶段, Kees Cook 建议内核可以开始使用一个宏来提前进行注解, 即便将来可能需要更改实际属性的名字. 考虑到 element_count 属性有可能在未来更名为 `counted_by`, Kees Cook 提议使用 `__counted_by` 作为宏名, 这在结构体定义中更加清晰和简洁. 这个宏在 `include/linux/compiler_attributes.h` 中定义, 其作用是在编译器支持 `__element_count__` 属性时, 为指定的变长数组成员添加 `__element_count__` 属性, 否则不做任何事情. 这样可以确保代码向前兼容, 同时为将来编译器支持新属性时的静态分析和运行时安全检查做好准备. 参见 [LWN, 2023/07/03, Documenting counted-by relationships in kernel data structures](https://lwn.net/Articles/936728). | v2 ☐☑✓ v6.5-rc1 | [LORE](https://lore.kernel.org/all/20230517190841.gonna.796-kees@kernel.org) |
+
+
## 13.14 Compiler
-------
@@ -1126,6 +1142,8 @@ Fedora 尝试优化 systemd 开机以及重启的时间, 参见 phoronix 报道
[Arm Helping With AArch64 Rust Linux Kernel Enablement](https://www.phoronix.com/news/AArch64-Rust-Linux-Kernel)
+[Linux 6.11 Adds Support For Rust-Based Block Drivers & Atomic Writes](https://www.phoronix.com/news/Linux-6.11-Block-IO_uring)
+
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:---:|:----:|:---:|:----:|:---------:|:----:|
| 2022/09/27 | Miguel Ojeda | [Rust support](https://lore.kernel.org/all/20220927131518.30000-1-ojeda@kernel.org) | TODO| v10 ☐☑✓ | [LORE 00/13](https://lore.kernel.org/all/20210414184604.23473-1-ojeda@kernel.org)
*-*-*-*-*-*-*-*
[LORE v10,0/27](https://lore.kernel.org/all/20220927131518.30000-1-ojeda@kernel.org) |
@@ -1134,6 +1152,7 @@ Fedora 尝试优化 systemd 开机以及重启的时间, 参见 phoronix 报道
| 2024/03/22 | Boqun Feng | [Memory model and atomic API in Rust](https://lore.kernel.org/all/20240322233838.868874-1-boqun.feng@gmail.com) | [A memory model for Rust code in the kernel](https://lwn.net/Articles/967049). | v1 ☐☑✓ | [LORE v1,0/3](https://lore.kernel.org/all/20240322233838.868874-1-boqun.feng@gmail.com) |
| 2024/05/14 | Wedson Almeida Filho | [Rust abstractions for VFS](https://lore.kernel.org/all/20240514131711.379322-1-wedsonaf@gmail.com) | 参见 phoronix 报道 [Microsoft Engineer Ports EXT2 File-System Driver To Rust](https://www.phoronix.com/news/Rust-VFS-Linux-V2-Now-With-EXT2) 以及 [Rust for filesystems](https://lwn.net/Articles/978738). | v2 ☐☑✓ | [LORE v2,0/30](https://lore.kernel.org/all/20240514131711.379322-1-wedsonaf@gmail.com) |
| 2024/05/20 | Danilo Krummrich | [DRM Rust abstractions and Nova](https://lore.kernel.org/all/20240520172059.181256-1-dakr@redhat.com) | [RFC Patches Posted For Rust-Written NVIDIA"Nova"GPU Driver](https://www.phoronix.com/news/RFC-Rust-Nova-NVIDIA-Driver). | v1 ☐☑✓ | [LORE v1,0/8](https://lore.kernel.org/all/20240520172059.181256-1-dakr@redhat.com) |
+| 2024/07/17 | Benno Lossin | [Introduce the Rust Safety Standard](https://lore.kernel.org/all/20240717221133.459589-1-benno.lossin@proton.me) | [Rust Safety Standard Proposed For The Linux Kernel](https://www.phoronix.com/news/Rust-Safety-Standard-Linux-RFC). | v1 ☐☑✓ | [LORE v1,0/5](https://lore.kernel.org/all/20240717221133.459589-1-benno.lossin@proton.me) |
diff --git a/study/kernel/00-DESCRIPTION/MEMORY_MANAGER.md b/study/kernel/00-DESCRIPTION/MEMORY_MANAGER.md
index 2576c06..1c7a20b 100644
--- a/study/kernel/00-DESCRIPTION/MEMORY_MANAGER.md
+++ b/study/kernel/00-DESCRIPTION/MEMORY_MANAGER.md
@@ -7383,7 +7383,7 @@ KFENCE 的灵感来自于 [GWP-ASan](http://llvm.org/docs/GwpAsan.html), 这是
2. 足够轻量, 以便它可以在线使用;
-DAMON 利用两个核心机制 : ** 基于区域的采样 ** 和 ** 自适应区域调整 **, 允许用户将跟踪开销限制在有界范围内, 而与目标工作负载的大小和复杂性无关, 同时保留结果的质量.
+DAMON 利用两个核心机制 : **基于区域的采样** 和 **自适应区域调整**, 允许用户将跟踪开销限制在有界范围内, 而与目标工作负载的大小和复杂性无关, 同时保留结果的质量.
| 机制 | 设计初衷 | 描述 |
|:---:|:-------:|:----:|
@@ -7431,6 +7431,7 @@ SeongJae Park 发布了 DAMON 2022 年度总结 [Looking back DAMON development
| 2022/04/29 | SeongJae Park | [mm/damon: Support online tuning](https://patchwork.kernel.org/project/linux-mm/cover/20220429160606.127307-1-sj@kernel.org/) | 637059 | v1 ☐☑ | [LORE v1,0/14](https://lore.kernel.org/r/20220429160606.127307-1-sj@kernel.org) |
| 2022/05/07 | Gautam Menghani | [Add documentation for Enum value'NR_DAMON_OPS'in](https://patchwork.kernel.org/project/linux-mm/patch/20220507165620.110706-1-gautammenghani201@gmail.com/) | 639422 | v1 ☐☑ | [LORE v1,0/1](https://lore.kernel.org/r/20220507165620.110706-1-gautammenghani201@gmail.com) |
| 2022/10/19 | SeongJae Park | [efficiently expose damos action tried regions information](https://patchwork.kernel.org/project/linux-mm/cover/20221019001317.104270-1-sj@kernel.org/) | 686501 | v1 ☐☑ | [LORE v1,0/18](https://lore.kernel.org/r/20221019001317.104270-1-sj@kernel.org) |
+| 2024/06/14 | Honggyu Kim | [DAMON based tiered memory management for CXL memory](https://lore.kernel.org/all/20240614030010.751-1-honggyu.kim@sk.com) | TODO | v6 ☐☑✓ | [LORE v6,0/7](https://lore.kernel.org/all/20240614030010.751-1-honggyu.kim@sk.com) |
### 13.6.3 DAMON Interface
diff --git a/study/kernel/00-DESCRIPTION/OPEN_SOURCE.md b/study/kernel/00-DESCRIPTION/OPEN_SOURCE.md
index c0df56a..fa3787b 100644
--- a/study/kernel/00-DESCRIPTION/OPEN_SOURCE.md
+++ b/study/kernel/00-DESCRIPTION/OPEN_SOURCE.md
@@ -80,10 +80,11 @@
-------
-| 分支 | 描述 | 内核 |
+| 内核 | 描述 | 网站 |
|:---:|:---:|:----:|
| [L4Linux](https://www.l4linux.org) | L4Linux 是[基于 Fiasco 微内核的跟普通 Linux 二进制完全兼容的 Linux 内核](https://blog.csdn.net/gracioushe/article/details/6023340). L4Linux 是运行 Fiasco 用户空间的一个进程, 由很多线程组成, 而 Native Linux 则是运行在内核空间, 如果不考虑 kernel thread 的话, 那么 Native Linux 就相当于一个运行在内核空间的大进程, 它实现了从处理器调度、内存管理到设备管理等所有一个操作系统的必备的功能. 参见 [Adam 的 diploma thesis](https://os.inf.tu-dresden.de/papers_ps/adam-diplom.pdf) | NA |
| [darwin-xnu](https://github.com/apple/darwin-xnu) | 苹果的微内核 | [opensource](https://opensource.apple.com/source/xnu), [cbowser/xnu](https://fergofrog.com/code/cbowser/xnu) |
+| HongMeng kernel (HM) | HUAWEI 自研的 HM 微内核 | 由一个最小核心内核和一组最低特权操作系统服务组成, 它可以运行 AOSP 和 OpenHarmony 等复杂框架. HM 已在新兴场景(包括智能路由器、智能汽车和智能手机)的数千万台设备上部署在生产中, 通常比 Linux 同类产品具有更高的性能和安全性. 参见 OSDI-2024 的论文 [Microkernel Goes General: Performance and Compatibility in the HongMeng Production Microkernel](https://www.usenix.org/conference/osdi24/presentation/chen-haibo). |
# 5 Linux Version
@@ -110,7 +111,7 @@
| 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) | NA | NA |
| 6.10 | [The first half of the 6.10 merge window](https://lwn.net/Articles/973687)
*-*-*-*-*-*-*-*
[The rest of the 6.10 merge window](https://lwn.net/Articles/974869)
*-*-*-*-*-*-*-*
[Kernel prepatch 6.10-rc2](https://lwn.net/Articles/976498). | NA | [Linux 6.10-rc1 Kernel Released With Many New Features](https://www.phoronix.com/news/Linux-6.10-rc1), [Linux 6.10-rc5 Released With This Kernel Cycle Looking Good So Far](https://www.phoronix.com/news/Linux-6.10-rc5) |
-
+| 6.11 | [The first half of the 6.11 merge window](https://lwn.net/Articles/982034) | NA | NA |
年终盘点
diff --git a/study/kernel/00-DESCRIPTION/SCHEDULER.md b/study/kernel/00-DESCRIPTION/SCHEDULER.md
index a0c2c28..802882f 100644
--- a/study/kernel/00-DESCRIPTION/SCHEDULER.md
+++ b/study/kernel/00-DESCRIPTION/SCHEDULER.md
@@ -1281,6 +1281,7 @@ PELT 算法几个关键的函数:
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:---:|:----:|:---:|:----:|:---------:|:----:|
| 2018/06/28 | Vincent Guittot | [track CPU utilization](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=5fd778915ad29184a5ff8eb82d1118f6916b79e4) | TODO | v7 ☑✓ 4.19-rc1 | [LORE v7,0/11](https://lore.kernel.org/all/1530200714-4504-1-git-send-email-vincent.guittot@linaro.org) |
+| 2024/02/22 | zhaoyang.huang | [sched: introduce helper function to calculate distribution over sched class](https://lore.kernel.org/all/20240222092220.642294-1-zhaoyang.huang@unisoc.com) | 由于 RT、DL、IRQ 时间可被视为 CFS 任务的损失时间, 因此一些时序值希望了解这些时间的分布情况. 时序值希望通过利用率(nivcsw 有时不够用)了解这些时间的分布情况. 这组补丁希望引入一个辅助函数 cfs_prop_by_util() 来实现这一目标. 计算该内核的指定 tsk 任务和所有 cfs 任务消耗的时序值的大致比例. 该函数实际上源于 effective_cpu_util, 但没有将 util 限制在内核容量范围内. se_prop 和 rq_prop 仅在返回值为 1 时有效. | v2 ☐☑✓ | [LORE v2,0/2](https://lore.kernel.org/all/20240222092220.642294-1-zhaoyang.huang@unisoc.com) |
### 3.2.5 Utilization Estimation(UTIL_EST)
-------
@@ -1364,6 +1365,7 @@ enqueue_task()
+
# 4 基于调度域的负载均衡
-------
@@ -1604,12 +1606,11 @@ rebalance_domains()
### 4.3.1.3 新的命名方式
-------
-
-
| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
|:----:|:----:|:---:|:----:|:--------:|:----:|
| 2024/03/08 | Ingo Molnar | [sched/balancing: Misc updates & cleanups](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=e492e1b0e0721f3929ef9d9708d029144b396dd7) | 修正 load_balancing 路径下部分数据结构以及变量的命名方式. | v1 ☐☑✓ | [LORE v4,00/10](https://lore.kernel.org/all/20240308105901.1096078-1-mingo@kernel.org) |
| 2024/03/08 | Ingo Molnar | [sched/balancing: Standardize the naming of scheduler load-balancing functions](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log?id=b9e6e28663928cab836a19abbdec3d036a07db3b) | 多年来, 我们已经发展出了一个丰富多彩的调度器负载平衡函数名称动物园——两者都遵循随机, 独特的模式, 以及获得不再准确的历史性误称. 我们有 "newidle_balance()" 来重新平衡新空闲的任务, 有 "rebalance_domains()" 用来重新平衡域. 我们有一个 find_idlest_cpu()函数, 其目的不再是查找空闲的 cpu, 以及一个 find_businest_queue()函数, 其目的不再是寻找最繁忙的运行队列. 因此 Ingo 发送了一组补丁集, 对负载均衡中不当的函数名进行了修正, 并沿着 sched_balance_*() 命名空间组织函数. | v1 ☐☑✓ v6.10-rc1 | [LORE v1,0/13](https://lore.kernel.org/all/20240308111819.1101550-1-mingo@kernel.org) |
+| 2024/04/07 | Ingo Molnar | [sched: Split out kernel/sched/fair_balance.c, numa_balancing.c and syscalls.c, plus other updates](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=04746ed80bcf3130951ed4d5c1bc5b0bcabdde22) | 主要目的是重构 Linux 内核调度器代码, 以提高其可读性和可维护性.
Ingo Molnar 指出 kernel/sched/core.c 和 fair.c 文件变得杂乱无章, 混合了调度器的多种功能, 这影响了核心调度和公平平衡类调度功能的核心性.
重构内容:
1. 将 syscall.c 从 core.c 中分离出来.
2. 将 fair_balance.c 和 numa_balancing.c 从 fair.c 中分离出来. | v1 ☐☑✓ v6.11-rc1 | [LORE v1,0/5](https://lore.kernel.org/all/20240407084319.1462211-1-mingo@kernel.org) |
### 4.3.2 CFS Task Lists
@@ -2839,7 +2840,18 @@ pseudo-interleaving 中 active_nodes 引入的目标是为了让共享页面在
| 2014/10/31 | Iulia Manda | [`sched: Refactor task_struct to use numa_faults instead of numa_* pointers`](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=44dba3d5d6a10685fb15bd1954e62016334825e0) | 使用 numa_faults 统一管理所有的 NUMA hinting fault 统计量. 引入了一个枚举 numa_faults_stats 来管理, 通过 task_faults_idx() 来通过下标的方式来直接访问. | v1 ☑ 3.19-rc1 | [LORE v5,0/9](https://lore.kernel.org/all/20141031001331.GA30662@winterfell), [COMMIT](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=44dba3d5d6a10685fb15bd1954e62016334825e0) |
| 2016/01/25 | Rik van Riel | [sched,numa,mm: spread memory according to CPU and memory use](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4142c3ebb685bb338b7d96090d8f90ff49065ff6) | 不再使用硬阈值 3/16, 6/16 来识别 active_nodes, 引入 ACTIVE_NODE_FRACTION 阈值来判别 active_nodes. 实现了一种更加渐进式的 NUMA 页面迁移策略. | v1 ☑ 4.6-rc1 | [LORE](https://lore.kernel.org/all/20160125170739.2fc9a641@annuminas.surriel.com) |
-#### 4.6.3.4 Task Placement 优化
+
+#### 4.6.4.4 Task Placement 优化
+-------
+
+
+| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 |
+|:----:|:----:|:---:|:---:|:----------:|:----:|
+| 2024/03/29 | Baolin Wang | [support multi-size THP numa balancing](https://lore.kernel.org/all/cover.1711683069.git.baolin.wang@linux.alibaba.com) | 这个补丁试图支持 THP 页面 的 NUMA Balancing.
问题背景: 当前的匿名页面分配已经支持多尺寸 THP, 但是 NUMA 平衡仍然禁止 mTHP 迁移, 即使它是独占映射, 这被认为是不合理的.
mTHP 扫描: 以前的提交(commit 859d4adc3415)跳过了共享 CoW 页面的 NUMA 页面迁移, 以避免共享数据段迁移. 另一个 commit 80d47f5de5e3, 它使用 page_count() 来避免 GUP 页面迁移, 这也会跳过 mTHP 的 NUMA 扫描, 理论上可以使用 folio_maybe_dma_pinned() 来检测 GUP(get_user_pages)问题, 尽管存在 GUP 竞争, 但似乎已经被之前的提交解决.
mTHP 迁移: 大尺寸的 folio(包括 THP)比 4K 基本页面更容易受到线程间虚假共享问题的影响, 导致页面在 NUMA 平衡过程中来回移动. 作为支持 mTHP NUMA 平衡的第一步, 可以采用 PMD(Page Middle Directories) 映射 THP 的策略, 使用 should_numa_migrate_memory() 中的两阶段过滤器来检查 mTHP 是否在线程间高度竞争, 以避免一定程度的虚假共享.
性能数据: 补丁提供了在不同 mTHP 尺寸(16K、64K、128K)下, 补丁版本与基础版本在 autonuma 基准测试中的表现对比. 数据显示补丁版本在某些测试场景下性能有显著提升. | v2 ☐☑✓ | [2024/03/26, LORE,0/2](https://lore.kernel.org/all/cover.1711453317.git.baolin.wang@linux.alibaba.com)
*-*-*-*-*-*-*-*
[2024/04/01, LORE v2,0/2](https://lore.kernel.org/all/cover.1711683069.git.baolin.wang@linux.alibaba.com)
*-*-*-*-*-*-*-*
[2024/04/03, LORE v3,0/2](https://lore.kernel.org/all/cover.1712132950.git.baolin.wang@linux.alibaba.com) |
+
+
+
+#### 4.6.4.5 Task Placement 优化
-------
* v3.13 把 NUMA Hinting Fault 最多的结点设置为 numa_preferred_nid
@@ -4151,6 +4163,8 @@ y = (1 - \frac{pct^{2}}{10000^{2}} \times x^{2}) \times llc\_weight
| 2022/01/26 | Yicong Yang | [sched/fair: Scan cluster before scanning LLC in wake-up path](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=984ffb6a4366752c949f7b39640aecdce222607f) | v5 之前叫 [sched/fair: Wake task within the cluster when possible](https://lore.kernel.org/all/20220126080947.4529-1-yangyicong@hisilicon.com). 这个补丁集负责唤醒路径的 cluster 感知, 在扫描整个 LLC 之前, 先在同一集群中其他的 CPU 尝试一下, 以使这些任务能够相互通信.
1. 引入 SD_CLUSTER 标记 cluster 域, 使用 per_cpu(sd_cluster, cpu) 和 per_cpu(sd_share_id, cpu) 标记 CPU 所属的 cluster 及其 ID
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)
*-*-*-*-*-*-*-*
[LORE v2,0/2](https://lore.kernel.org/all/20220126080947.4529-1-yangyicong@hisilicon.com)
*-*-*-*-*-*-*-*
[LORE v3,0/2](https://lore.kernel.org/lkml/20220608095758.60504-1-yangyicong@hisilicon.com)
*-*-*-*-*-*-*-*
[LORE v4,0/2](https://lore.kernel.org/lkml/20220609120622.47724-1-yangyicong@hisilicon.com)
*-*-*-*-*-*-*-*
[LORE v5,0/2](https://lore.kernel.org/lkml/20220720081150.22167-1-yangyicong@hisilicon.com)
*-*-*-*-*-*-*-*
[LORE v6,0/2](https://lore.kernel.org/lkml/20220726074758.46686-1-yangyicong@huawei.com)
*-*-*-*-*-*-*-*
[LORE v7,0/2](https://lore.kernel.org/all/20220822073610.27205-1-yangyicong@huawei.com) |
| 2023/04/10 | K Prateek Nayak | [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) |
| 2023/05/04 | Tim Chen | [Enable Cluster Scheduling for x86 Hybrid CPUs]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=ed74cc4995d314ea6cbf406caf978c442f451fa5) | 当集群调度首次引入 x86 时, 人们注意到, 在混合 CPU 上进行集群调度时, 单线程任务通常会在 Atom 核 (或 E 核) 上完成, 而不是在空闲的 Big 核 (或 P 核) 上, 从而导致性能降低. 因此, x86 混合 CPU 上的集群调度被禁用. 参见: [Linux 5.16's New Cluster Scheduling Is Causing Regression, Further Hurting Alder Lake](https://www.phoronix.com/review/linux-516-regress) 和 [Intel Updates Cluster Scheduling Linux Patches For Hybrid CPUs](https://www.phoronix.com/news/Intel-Cluster-Sched-Hybrid-V2). Ricardo 最近推出了 [sched: Avoid unnecessary migrations within SMT domains](https://lore.kernel.org/lkml/20230406203148.19182-1-ricardo.neri-calderon@linux.intel.com) 系列, 极大地改进了 x86 混合 CPU 上 P 核和 E 核之间的负载平衡逻辑. 然而, 该补丁系列不足以允许在混合 x86 CPU 上启用集群调度. 此补丁系列提供了一些额外的修复程序, 用于在由 Big Core 的 SMT CPU 组成的集群调度组和由 Atom CPU 组成的群集调度组之间进行负载平衡. 在 Ricardo 的补丁系列之上继续 APPLY 当前补丁, 可以在 P 核和 E 核集群之间适当平衡负载. 空闲 CPU 按正确顺序使用: 1). 空闲 P 核上的 SMT CPU, 2). 空闲 E 核, 3). 未使用的 SMT CPU 和繁忙的同级.
在 x86 上, Cluster 中的 CPU 共享 L2. 现在, 在启用 Cluster Scheduling 的情况下, Cluster 之间的负载得到了平衡, 从而可能减少 L2 争用. 参见 [Intel Posts New Linux Patches For Cluster Scheduling With Hybrid CPUs](https://www.phoronix.com/news/Intel-Hybrid-CPU-Cluster-Sched) 和 [Intel Updates x86 Hybrid CPU Cluster Scheduling For The Linux Kernel](https://www.phoronix.com/news/Intel-Hybrid-Cluster-Sched-v3). | v1 ☐☑✓ 6.6-rc1 | [LORE v1,0/4](https://lore.kernel.org/lkml/20220825225529.26465-1-ricardo.neri-calderon@linux.intel.com)
*-*-*-*-*-*-*-*
[LORE v2,0/7](https://lore.kernel.org/lkml/20221122203532.15013-1-ricardo.neri-calderon@linux.intel.com)
*-*-*-*-*-*-*-*
[LORE v3,0/10](https://lore.kernel.org/lkml/20230207045838.11243-1-ricardo.neri-calderon@linux.intel.com)
*-*-*-*-*-*-*-*
[LORE v4,00/12](https://lore.kernel.org/lkml/20230406203148.19182-1-ricardo.neri-calderon@linux.intel.com)
*-*-*-*-*-*-*-*
[LORE v2,0/6](https://lore.kernel.org/all/cover.1683156492.git.tim.c.chen@linux.intel.com)
*-*-*-*-*-*-*-*
[LORE v3,0/6](https://lore.kernel.org/lkml/cover.1688770494.git.tim.c.chen@linux.intel.com) |
+| 2024/02/01 | alexs@kernel.org | [sched/fair: add SD_CLUSTER in comments](https://lore.kernel.org/all/20240201115447.522627-1-alexs@kernel.org) | TODO | v3 ☐☑✓ | [LORE v3,0/4](https://lore.kernel.org/all/20240201115447.522627-1-alexs@kernel.org) |
+
### 5.5.2 Multiple LLCs
-------
@@ -5314,9 +5328,13 @@ CPUFreq 驱动是处理和平台相关的逻辑, Governor 中实现了具体的
| 2016/03/13 | Michael Turquette | [schedutil enhancements](https://lore.kernel.org/all/1457932932-28444-1-git-send-email-mturquette+renesas@baylibre.com) | 1457932932-28444-1-git-send-email-mturquette+renesas@baylibre.com | v1 ☐☑✓ | [LORE v1,0/8](https://lore.kernel.org/all/1457932932-28444-1-git-send-email-mturquette+renesas@baylibre.com) |
-### 7.3.3 schedutil 后续优化
+### 7.3.3 基于 schedutil 的后续优化
-------
+#### 7.3.3.1 社区基于 schedutil 的进一步优化和改进
+-------
+
+
| 时间 | 特性 | 描述 | 是否合入主线 | 链接 |
|:----:|:----:|:---:|:----------:|:---:|
| 2021/08/12 | Viresh Kumar | [Add callback to register with energy model](https://lore.kernel.org/patchwork/cover/1424708) | 当前许多 cpufreq 驱动程序向每个策略的注册了能耗模型, 并通过相同的操作 dev_pm_opp_of_register_em() 来完成. 但是随着 thermal-cooling 的完善, 可以在 cpufreq 层次通过新的回调 register_em 来完成这个工作. | v3 ☐ | [PatchWork V3,0/9](https://patchwork.kernel.org/project/linux-arm-kernel/cover/cover.1628742634.git.viresh.kumar@linaro.org) |
@@ -5324,7 +5342,7 @@ CPUFreq 驱动是处理和平台相关的逻辑, Governor 中实现了具体的
| 2023/07/24 | Jie Zhan | [cpufreq: Support per-policy performance boost](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=218a06a79d9a98a96ef46bb003d4d8adb0962056) | 通过添加 "local_boost" sysfs 接口启用按策略提升. 与全局升压开关相同, 将 1/0 写入 "local_boost" 可分别启用 / 禁用 cpufreq 策略上的升压.
全局和本地增压控制的用户视图应为:
1. 启用全局增强最初会对所有策略启用本地增强, 然后可以对每个策略单独启用或禁用本地增强, 前提是平台确实支持.
2. 禁用全局 boost 会使启用本地 boost 成为非法, 而将 0 写入 "local_boost" 是可以的, 但不会生效. [Per-Policy CPU Performance Boosting Proposed For Linux](https://www.phoronix.com/news/Linux-Per-Policy-CPU-Perf-Boost) | v1 ☐☑✓ 6.6-rc1 | [LORE](https://lore.kernel.org/all/20230724075827.4160512-1-zhanjie9@hisilicon.com) |
-### 7.3.4 各个厂商基于 schedutil 的进一步优化和改进
+#### 7.3.3.2 各个手机厂商基于 schedutil 的进一步优化和改进
-------
华为针对 schedutil 进行优化, 通过 CONFIG_CPU_FREQ_GOV_SCHEDUTIL_OPT, 提供了一套与 interactive 兼容的参数和机制, 实现了用户态对 schedutil 决策的干预和优化. 参见 [mate40, cpufreq_schedutil](https://github.com/gatieme/MobileModels/blob/huawei/noh-mate40/kernel/sched/cpufreq_schedutil.c)
@@ -5334,6 +5352,19 @@ CPUFreq 驱动是处理和平台相关的逻辑, Governor 中实现了具体的
小米在邮件列表发布了 [Provide USF for the portable equipment.](https://lore.kernel.org/all/cover.1596612536.git.yangdongdong@xiaomi.com) 在启用 cpufreq 上的调整, 并按计划调整用户敏感系数. 它特别适用于在屏幕上显示更多电源保护和快速响应要求的移动设备.
+#### 7.3.3.3 schedutil iowait_boost
+-------
+
+| 时间 | 特性 | 描述 | 是否合入主线 | 链接 |
+|:----:|:----:|:---:|:----------:|:---:|
+| 2016/08/01 | Rafael J. Wysocki | [cpufreq / sched: cpufreq_update_util() flags and iowait boosting](https://lore.kernel.org/all/3752826.3sXAQIvcIA@vostro.rjw.lan) | TODO | v1 ☐☑✓ | [LORE v1,0/7](https://lore.kernel.org/all/3752826.3sXAQIvcIA@vostro.rjw.lan) |
+| 2016/09/03 | Rafael J. Wysocki | [cpufreq / sched: iowait boost in intel_pstate and schedutil](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=21ca6d2c52f8ca8638129c1dfc489d0b0ae68532) | TODO | v1 ☐☑✓ | [LORE v1,0/4](https://lore.kernel.org/all/2730042.XLMy9dAKI1@vostro.rjw.lan)
*-*-*-*-*-*-*-*
[cpufreq / sched: iowait boost in intel_pstate and schedutil](https://lore.kernel.org/all/21371892.ALJNnHKoBY@vostro.rjw.lan) | TODO | v1 ☐☑✓ v4.9-rc1 | [LORE v1,0/3](https://lore.kernel.org/all/21371892.ALJNnHKoBY@vostro.rjw.lan) |
+
+| 2018/05/22 | Patrick Bellasi | [Fix and cleanup iowait boost](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=fd7d5287fd65df054bdade3e52ceb645cb411e72) | TODO | v4 ☐☑✓ v4.18-rc1 | [LORE v4,0/2](https://lore.kernel.org/all/20180522110754.20832-1-patrick.bellasi@arm.com) |
+| 2024/03/04 | Christian Loehle | [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) |
+
+
+
### 7.3.5 CPU-DDR 联动调频
-------
@@ -6191,6 +6222,7 @@ EEVDF 的核心理念就可以从它的名字中看出, 它将首先运行那些
| 2023/04/01 | Xi Wang | [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/28 | Peter Zijlstra | [sched: EEVDF using latency-nice](https://lore.kernel.org/all/20230328092622.062917921@infradead.org) | [EEVDF Scheduler Patches Updated For The Linux Kernel](https://www.phoronix.com/news/Linux-EEVDF-EO-March) | v1 ☐☑✓ | [LORE 00/10](https://lore.kernel.org/all/20230306132521.968182689@infradead.org)
*-*-*-*-*-*-*-*
[LORE v1,0/17](https://lore.kernel.org/all/20230328092622.062917921@infradead.org) |
| 2023/07/19 | Peter Zijlstra | [sched: EEVDF and latency-nice and/or slice-attr](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=b41bbb33cf75d251a816768580819aec17be718d) | [Updated EEVDF Linux CPU Scheduler Patches Posted That Plan To Replace CFS](https://www.phoronix.com/news/EEVDF-Scheduler-Linux-EO-May) 以及 [EEVDF Scheduler May Be Ready For Landing With Linux 6.6](https://www.phoronix.com/news/Linux-6.6-EEVDF-Likely), [EEVDF Scheduler Merged For Linux 6.6, Intel Hybrid Cluster Scheduling Re-Introduced](https://www.phoronix.com/news/Linux-6.6-EEVDF-Merged) | v1 ☐☑✓ 6.6-rc1 | [LORE v1,0/15](https://lore.kernel.org/all/20230531115839.089944915@infradead.org), [CGIT](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=d07f09a1f99cabbc86bc5c97d962eb8a466106b5) |
+| 2024/01/11 | Ze Gao | [sched/eevdf: Use tunable knob sysctl_sched_base_slice as explicit time quanta](https://lore.kernel.org/all/20240111115745.62813-2-zegao@tencent.com) | 这组补丁使用可调的内核参数 `sysctl_sched_base_slice` 作为显式的时间量子(time quanta), 可以更自由地选择请求长度范围, 同时避免过度或不足调度的问题, 以改善调度程序的性能和公平性.
EEVDF 的实现忽略了论文中时间量子(time quanta)概念在 EEVDF 中的作用, 为了避免不公平的调度, 时间量子(q)和最大用户请求(r_max)都不应过大. 为了提高吞吐量, 目前的实现 [Re: schbench v1.0](https://lore.kernel.org/all/20230420150537.GC4253@hirez.programming.kicks-ass.net/T/#u) 选择在每个请求边界(即一旦一个请求被满足)进行 tick preemtion 的抢占式调度, 这意味着实际上没有定义时间量子. 当允许自定义切片时, 由于没有明确的时间量子, 可能会导致失去很多调度机会来维护公平性和响应性, 并可能导致意外的不公平性和延迟. 例如, 两个具有相同权重的 CPU 密集型进程绑定到同一个 CPU 上时, 如果没有时间量子, 调度的滞后界限将仅取决于用户请求的切片分布. 即使用自定义时间片可能会损害公平性. 但是, 如果让时间量子等于每个请求的长度 sysctl_sched_base_slice, 那么实际上会创建一个隐含的时间量子, 可以更好地控制分配的准确性和平均延迟, 这在当前情况下工作得很好. 此外, 通过调整这个参数, 可以在吞吐量和延迟之间找到更好的平衡. | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240111115745.62813-2-zegao@tencent.com) |
#### 8.9.2.2 公式推导与实现
@@ -6341,6 +6373,7 @@ $deadline_{se} = vruntime_{se} + slice \times \frac{weight_0}{weight_{se}}$
| 2023/09/05 | Mathieu Desnoyers | [sched/eevdf: Rate limit task migration](https://lore.kernel.org/all/20230905171105.1005672-1-mathieu.desnoyers@efficios.com) | 实现任务迁移速率限制, 以加快触发频繁迁移的工作负载模式, 如 hackbbench. 第一个补丁 [sched: Rate limit migrations to 1 per 2ms per task](https://lore.kernel.org/lkml/20230905171105.1005672-2-mathieu.desnoyers@efficios.com) 实现了一个简单的速率限制, 即每 2ms 迁移一次. 第二个补丁 [sched: Implement adaptative rate limiting of task migrations](https://lore.kernel.org/lkml/20230905171105.1005672-3-mathieu.desnoyers@efficios.com) 实现了自适应任务迁移速率限制. | v1 ☐☑✓ | [LORE v1,0/2](https://lore.kernel.org/all/20230905171105.1005672-1-mathieu.desnoyers@efficios.com) |
| 2024/02/28 | Tobias Huschle | [sched/eevdf: avoid task starvation in cgroups](https://lore.kernel.org/all/20240228161023.14310-1-huschle@linux.ibm.com) | TODO | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240228161023.14310-1-huschle@linux.ibm.com) |
| 2024/05/24 | Chunxin Zang | [sched/fair: Reschedule the cfs_rq when current is ineligible](https://lore.kernel.org/all/20240524134011.270861-1-spring.cxz@gmail.com) | 作者发现有些任务运行了足够长的时间, 已经成为非法任务, 但它们仍未释放 CPU. 这会增加其他进程的调度延迟. 因此, 作者尝试在 wakeup_preempt 和 entity_tick 中检查当前进程, 如果是非法进程, 则重新调度该 cfs 队列. 当启用 RUN_TO_PARITY 时, 这一修改可以将调度延迟减少约 30%. | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240524134011.270861-1-spring.cxz@gmail.com) |
+| 2024/02/28 | Tobias Huschle | [sched/eevdf: sched feature to dismiss lag on wakeup](https://lore.kernel.org/all/20240228161018.14253-1-huschle@linux.ibm.com) | 旨在任务被唤醒时忽略其之前的延迟(lag).
背景: 之前的CFS(Completely Fair Scheduler)调度器通过在任务唤醒时从其虚拟运行时间(vruntime)中减去一定值, 增加了任务立即获得运行时间的机会. 这种特性被某些组件, 如 vhost, 用来确保特定的 kworker 在被唤醒后能够立即被调度执行. 然而, EEVDF 调度器目前并不支持这种行为.
问题: 在EEVDF调度器中, 如果一个被唤醒的实体带有之前执行的负延迟, 它将不得不等待当前时间片结束, 这可能会对期望立即执行的进程的性能产生负面影响.
提议的解决方案: Tobias 提出了实现 用于重新加入实体, 该策略忽略之前执行的延迟, 并允许被唤醒的任务立即运行(如果EEVDF没有认为其他实体更值得调度).
实现细节: 为了确保被唤醒的任务能够实际运行, vruntime 额外减去了 1. 这虽然不是严格按照之前讨论的策略来实现的, 但可以保证上述场景的预期行为. | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240228161018.14253-1-huschle@linux.ibm.com) |
滞后计算仅与可运行的任务相关; 休眠很久的任务实际上并没有错过它的虚拟运行时间(因为它没有), 所以它不会累积巨大的滞后值. 但是, EEVDF 调度器实现的时候, 在任务进入睡眠状态时会保留任务的当前滞后值, 并在任务唤醒时从该值开始. 因此, 如果一个任务在它进入睡眠状态之前已经超出了它的分配范围, 那么当它醒来时, 它将为此付出代价.
@@ -6471,8 +6504,10 @@ CONFIG_HUAWEI_SCHED_VIP 被标记为 vip_prio, 为 VIP 线程提供了近似于
|:----:|:----:|:---:|:----:|:---------:|:----:|
| 2013/03/21 | Thomas Gleixner | [idle: Consolidate idle implementations](https://lore.kernel.org/all/20130321214930.752934102@linutronix.de) | 当前每个体系结构都实现自己的 cpu_idle() 代码, 这是没有必要的因此实现了一套通用架构无关的 cpu_idle 框架. | v1 ☑ 3.10-rc1 | [PatchWork 00/34](https://lore.kernel.org/all/20130321214930.752934102@linutronix.de) |
+## 9.2 IDLE GOVERNOR
+-------
-## 9.2 TEO
+### 9.2.2 TEO
-------
[The cpuidle subsystem](https://lwn.net/Articles/384146)
@@ -6491,6 +6526,9 @@ CONFIG_HUAWEI_SCHED_VIP 被标记为 vip_prio, 为 VIP 线程提供了近似于
| 2023/07/31 | Rafael J. Wysocki | [cpuidle: teo: Avoid stopping scheduler tick too often](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?id=9a41e16f11103c37263271ff2a433f2f3885fced) | 当选择的空闲状态很浅时, 该系列显著减少了 TEO 请求停止 TICK 的情况. | v3 ☑✓ 6.6-rc1 | [LORE v3,0/3](https://lore.kernel.org/all/4515817.LvFx2qVVIh@kreacher) |
+### 9.2.3 ALIGN
+-------
+
## 9.3 CPU-Idle latency
-------
@@ -6848,10 +6886,11 @@ LSFMMBPF 2024 上对 sched_ext 进行了讨论 [LWN, 2024/05/23, LSFMMBPF-2024,
| 2021/09/15 | Roman Gushchin | [Scheduler BPF](https://www.phoronix.com/scan.php?page=news_item&px=Linux-BPF-Scheduler) | NA | RFC ☐ | [PatchWork rfc,0/6](https://patchwork.kernel.org/project/netdevbpf/cover/20210916162451.709260-1-guro@fb.com)
*-*-*-*-*-*-*-*
[LPC 2021](https://linuxplumbersconf.org/event/11/contributions/954)
*-*-*-*-*-*-*-*
[LKML](https://lkml.org/lkml/2021/9/16/1049), [LWN](https://lwn.net/Articles/869433), [LWN](https://lwn.net/Articles/873244) |
| 2022/11/29 | Tejun Heo | [sched: Implement BPF extensible scheduler class](https://lore.kernel.org/all/20221130082313.3241517-1-tj@kernel.org) | 随后 FaceBook 进一步扩展, 引入 sched_ext 模块, 使用 eBPF 对调度器进行可编程重构. [Experimental Patches Allow eBPF To Extend The Linux Kernel's Scheduler](https://www.phoronix.com/news/RFC-eBPF-Linux-Scheduler), [The BPF extensible scheduler class](https://lwn.net/Articles/916291), [The extensible scheduler class](https://lwn.net/Articles/922405/), [Patches Updated For Hooking eBPF Programs Into The Linux Kernel Scheduler](https://www.phoronix.com/news/Linux-Scheduler-eBPF-v2-sched). 以及 [Extensible scheduler class rejected](https://lwn.net/Articles/939332) | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20221130082313.3241517-1-tj@kernel.org)
*-*-*-*-*-*-*-*
[LORE v2,00/30](https://lore.kernel.org/lkml/20230128001639.3510083-1-tj@kernel.org)
*-*-*-*-*-*-*-*
[2023/11/11, LORE v5](https://lore.kernel.org/all/20231111024835.2164816-1-tj@kernel.org)
*-*-*-*-*-*-*-*
[2024/05/11, LORE v6,00/39](https://lore.kernel.org/all/20240501151312.635565-1-tj@kernel.org)
*-*-*-*-*-*-*-*
[2024/06/18, LORE v7,00/30](https://lore.kernel.org/all/20240618212056.2833381-1-tj@kernel.org) |
| 2024/07/08 | Hongyan Xia | [sched/ext: Add BPF function to fetch rq](https://lore.kernel.org/all/7359b5cd17d56837bc15f4883b21837163c51d37.1720441953.git.hongyan.xia2@arm.com) | rq 包含许多有用的字段, 可用于执行自定义调度程序. 例如, 可以使用各种时钟信号(如 clock_task 和 clock_pelt)来跟踪负载. 它还包含其他 sched_classes 中的统计信息, 这些信息对于在 ext 中驱动调度决策非常有用. | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/7359b5cd17d56837bc15f4883b21837163c51d37.1720441953.git.hongyan.xia2@arm.com) |
-| 2024/06/18 | Tejun Heo | [sched_ext: Integrate with schedutil](https://lore.kernel.org/all/20240619031250.2936087-1-tj@kernel.org) | sched_ext 目前没有与 schedutil 集成. 当 schedutil 作为调频 GOVERNOR 时, 频率不受控制. 本补丁集将 sched_ext 与 schedutil 集成, 以便 BPF 调度程序 调度器时可以控制 CPU 频率. 实现 sugov_get_util()更新, 以添加 BPF 调度器提供的利用率. | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240619031250.2936087-1-tj@kernel.org) |
-| 2024/07/09 | Tejun Heo | [sched_ext: Implement DSQ iterator](https://lore.kernel.org/all/20240709004041.1111039-1-tj@kernel.org) | TODO | v5 ☐☑✓ | [LORE v5](https://lore.kernel.org/all/20240709004041.1111039-1-tj@kernel.org) |
-| 2024/07/10 | Tejun Heo | [sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches](https://lore.kernel.org/all/20240711011434.1421572-1-tj@kernel.org) | TODO | v2 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240709212137.1199269-1-tj@kernel.org)
*-*-*-*-*-*-*-*
[LORE](https://lore.kernel.org/all/20240711011434.1421572-1-tj@kernel.org) |
+| 2024/06/18 | Tejun Heo | [sched_ext: Integrate with schedutil](https://lore.kernel.org/all/20240619031250.2936087-1-tj@kernel.org) | sched_ext 目前没有与 schedutil 集成. 当 schedutil 作为调频 GOVERNOR 时, 频率不受控制. 本补丁集将 sched_ext 与 schedutil 集成, 以便 BPF 调度程序 调度器时可以控制 CPU 频率. 实现 sugov_get_util() 更新, 以添加 BPF 调度器提供的利用率. | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240619031250.2936087-1-tj@kernel.org) |
+| 2024/07/09 | Tejun Heo | [sched_ext: Implement DSQ iterator](https://lore.kernel.org/all/20240709004041.1111039-1-tj@kernel.org) | 目的是为调度器扩展 (sched_ext) 实现 DSQ(Distribution Skilled Queue) 迭代器. DSQs 在消费路径中是不透明的, eBPF 调度器没有办法知道哪些任务正在被考虑以及哪个任务被选中. 这个补丁集合添加了 BPF DSQ 迭代器,以便 BPF 调度器在使用 DSQs. | v5 ☐☑✓ | [LORE v5](https://lore.kernel.org/all/20240709004041.1111039-1-tj@kernel.org) |
+| 2024/07/10 | Tejun Heo | [sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches](https://lore.kernel.org/all/20240711011434.1421572-1-tj@kernel.org) | 主要目的是改进调度器扩展 (sched_ext) 以允许在直接调度时使用 SCX_DSQ_LOCAL_ON. 在 ops.dispatch()中, 可以使用 SCX_DSQ_LOCAL_ON 将任务调度到任何 CPU 的本地 DSQ(分布技能队列). 但在 ops.select_cpu() 和 ops.enqueue() 中的直接调度不允许这样做. 这是因为将任务调度到远程 CPU 的本地 DSQ 需要同时锁定任务的当前 rq 和新 rq, 而这种双重锁定不能直接从 ops.enqueue()完成. 这个 API 的缺失迫使调度器使用不直接或非最优的工作方式, 例如在这些情况下跳过直接调度. | v2 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240709212137.1199269-1-tj@kernel.org)
*-*-*-*-*-*-*-*
[LORE](https://lore.kernel.org/all/20240711011434.1421572-1-tj@kernel.org) |
| 2024/07/10 | K Prateek Nayak | [sched/core: Fixes and enhancements around spurious need_resched() and idle load balancing](https://lore.kernel.org/all/20240710090210.41856-1-kprateek.nayak@amd.com) | TODO | v1 ☐☑✓ | [LORE v1,0/3](https://lore.kernel.org/all/20240710090210.41856-1-kprateek.nayak@amd.com) |
+| 2024/07/19 | Carlos Bilbao | [docs: scheduler: Start documenting the EEVDF scheduler](https://lore.kernel.org/all/20240720002207.444286-1-carlos.bilbao.osdev@gmail.com) | Carlos Bilbao 在更新 CFS(Completely Fair Scheduler) 文档的过程中意识到, 目前还没有指向 EEVDF 文档的资料, 因此他开始了这项工作. | v3 ☐☑✓ | [LORE v3,0/1](https://lore.kernel.org/all/20240720002207.444286-1-carlos.bilbao.osdev@gmail.com) |
#### 11.2.2.2 Google 的 ghOSt
diff --git a/study/kernel/00-DESCRIPTION/TODO.md b/study/kernel/00-DESCRIPTION/TODO.md
index 5bc08fe..99f2a70 100644
--- a/study/kernel/00-DESCRIPTION/TODO.md
+++ b/study/kernel/00-DESCRIPTION/TODO.md
@@ -611,24 +611,19 @@ https://lore.kernel.org/all/20240115105052.398761-1-khorenko@virtuozzo.com/
https://lore.kernel.org/all/20231215130501.24542-1-anna-maria@linutronix.de/
cba6167f0adb
+
+
| 2023/09/29 | Kees Cook | [`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 | [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 | [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 | [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) |
| 2024/04/11 | Kyle Huey | [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 | [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 | [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 | [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) |
-| 2024/02/01 | alexs@kernel.org | [sched/fair: add SD_CLUSTER in comments](https://lore.kernel.org/all/20240201115447.522627-1-alexs@kernel.org) | TODO | v3 ☐☑✓ | [LORE v3,0/4](https://lore.kernel.org/all/20240201115447.522627-1-alexs@kernel.org) |
+
| 2024/01/14 | Vincent Guittot | [sched/fair: Fix frequency selection for non invariant case](https://lore.kernel.org/all/20240114183600.135316-1-vincent.guittot@linaro.org) | TODO | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240114183600.135316-1-vincent.guittot@linaro.org) |
-| 2024/01/11 | Ze Gao | [sched/eevdf: Use tunable knob sysctl_sched_base_slice as explicit time quanta](https://lore.kernel.org/all/20240111115745.62813-2-zegao@tencent.com) | TODO | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240111115745.62813-2-zegao@tencent.com) |
| 2024/03/15 | Swapnil Sapkal | [Fix lb_imbalance reporting in /proc/schedstat](https://lore.kernel.org/all/20240315135501.1778620-1-swapnil.sapkal@amd.com) | TODO | v2 ☐☑✓ | [LORE v2,0/1](https://lore.kernel.org/all/20240315135501.1778620-1-swapnil.sapkal@amd.com) |
-| 2024/04/03 | Jinjie Ruan via | [target/arm: Implement FEAT_NMI and FEAT_GICv3_NMI](https://lore.kernel.org/all/20240403101611.3204086-1-ruanjinjie@huawei.com) | TODO | v3 ☐☑✓ | [LORE v3,0/23](https://lore.kernel.org/all/20240403101611.3204086-1-ruanjinjie@huawei.com) |
-| 2024/02/22 | zhaoyang.huang | [sched: introduce helper function to calculate distribution over sched class](https://lore.kernel.org/all/20240222092220.642294-1-zhaoyang.huang@unisoc.com) | TODO | v2 ☐☑✓ | [LORE v2,0/2](https://lore.kernel.org/all/20240222092220.642294-1-zhaoyang.huang@unisoc.com) |
| 2024/05/03 | Andrii Nakryiko | [ioctl()-based API to query VMAs from /proc//maps](https://lore.kernel.org/all/20240504003006.3303334-1-andrii@kernel.org) | TODO | v1 ☐☑✓ | [LORE v1,0/5](https://lore.kernel.org/all/20240504003006.3303334-1-andrii@kernel.org) |
| 2024/02/25 | Frederic Weisbecker | [timers/nohz cleanups and hotplug reorganization](https://lore.kernel.org/all/20240225225508.11587-1-frederic@kernel.org) | TODO | v3 ☐☑✓ | [LORE v3,0/16](https://lore.kernel.org/all/20240225225508.11587-1-frederic@kernel.org) |
| 2024/02/14 | David Hildenbrand | [mm/memory: optimize unmap/zap with PTE-mapped THP](https://lore.kernel.org/all/20240214204435.167852-1-david@redhat.com) | TODO | v3 ☐☑✓ | [LORE v3,0/10](https://lore.kernel.org/all/20240214204435.167852-1-david@redhat.com) |
-| 2024/03/29 | Baolin Wang | [support multi-size THP numa balancing](https://lore.kernel.org/all/cover.1711683069.git.baolin.wang@linux.alibaba.com) | 这个补丁试图支持 mTHP-numa 平衡, 作为一个简单的解决方案, mTHP 的 numa 平衡算法将遵循 THP 策略作为基本支持. 请在每个补丁中找到详细信息. | v2 ☐☑✓ | [LORE v2,0/2](https://lore.kernel.org/all/cover.1711683069.git.baolin.wang@linux.alibaba.com) |
| 2024/03/29 | weilin.wang@intel.com | [TPEBS counting mode support](https://lore.kernel.org/all/20240329191224.1046866-1-weilin.wang@intel.com) | TODO | v6 ☐☑✓ | [LORE v6,0/5](https://lore.kernel.org/all/20240329191224.1046866-1-weilin.wang@intel.com) |
| 2024/04/30 | Vitalii Bursov | [sched/fair: allow disabling sched_balance_newidle with sched_relax_domain_level](https://lore.kernel.org/all/cover.1714488502.git.vitaly@bursov.com) | TODO | v4 ☐☑✓ | [LORE v4,0/3](https://lore.kernel.org/all/cover.1714488502.git.vitaly@bursov.com) |
| 2024/02/29 | Thomas Gleixner | [x86/idle: Cure RCU violations and cleanups](https://lore.kernel.org/all/20240229141407.283316443@linutronix.de) | TODO | v1 ☐☑✓ | [LORE v1,0/6](https://lore.kernel.org/all/20240229141407.283316443@linutronix.de) |
@@ -638,9 +633,7 @@ cba6167f0adb
| 2024/03/27 | Bharata B Rao | [Hot page promotion optimization for large address space](https://lore.kernel.org/all/20240327160237.2355-1-bharata@amd.com) | TODO | v1 ☐☑✓ | [LORE v1,0/2](https://lore.kernel.org/all/20240327160237.2355-1-bharata@amd.com) |
| 2024/05/06 | Qais Yousef | [sched: Consolidate cpufreq updates](https://lore.kernel.org/all/20240505233103.168766-1-qyousef@layalina.io) | TODO | v2 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240505233103.168766-1-qyousef@layalina.io) |
| 2024/03/28 | mingyang.cui | [sched/fair: Fix forked task check in vruntime_normalized](https://lore.kernel.org/all/20240328062757.29803-1-mingyang.cui@horizon.ai) | TODO | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240328062757.29803-1-mingyang.cui@horizon.ai) |
-| 2024/04/02 | Tio Zhang | [sched: make softirq cputime accounting separately in irqtime](https://lore.kernel.org/all/20240402112415.GA17946@didi-ThinkCentre-M930t-N000) | 我们现在在延迟统计中只能获得 IRQ/SOFTIRQ 的总延迟, 但单独获得 SOFTIRQ 延迟和 IRQ 延迟将有助于用户以更方便的方式减少此类延迟. 对于 IRQ 延迟, 我们可以调整 IRQ-CPU 相关性或使用线程 IRQ.
-对于 SOFTIRQ 延迟, 我们可以调整 rps/xps 或使用 NAPI 的内核线程. 因此, 这个补丁集试图使 SOFTIRQ 延迟在延迟统计中可观察到, 并在 taskstats 中可用. 补丁集同步更新了 `tools/accounting/getdelays.c` 同样为了向后兼容性, 我们不想改变原始 IRQ/SOFTIRQ 延迟的含义, 相反, 我们可以通过原始 IRQ/OFTIRQ 的延迟减去该补丁添加的 SOFTIREQ 延迟来获得真实的 IRQ(中断) 延迟. | v1 ☐☑✓ | [LORE v1,0/3](https://lore.kernel.org/all/20240402112415.GA17946@didi-ThinkCentre-M930t-N000) |
-| 2024/02/28 | Tobias Huschle | [sched/eevdf: sched feature to dismiss lag on wakeup](https://lore.kernel.org/all/20240228161018.14253-1-huschle@linux.ibm.com) | TODO | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240228161018.14253-1-huschle@linux.ibm.com) |
+| 2024/04/02 | Tio Zhang | [sched: make softirq cputime accounting separately in irqtime](https://lore.kernel.org/all/20240402112415.GA17946@didi-ThinkCentre-M930t-N000) | 我们现在在延迟统计中只能获得 IRQ/SOFTIRQ 的总延迟, 但单独获得 SOFTIRQ 延迟和 IRQ 延迟将有助于用户以更方便的方式减少此类延迟. 对于 IRQ 延迟, 我们可以调整 IRQ-CPU 相关性或使用线程 IRQ. 对于 SOFTIRQ 延迟, 我们可以调整 rps/xps 或使用 NAPI 的内核线程. 因此, 这个补丁集试图使 SOFTIRQ 延迟在延迟统计中可观察到, 并在 taskstats 中可用. 补丁集同步更新了 `tools/accounting/getdelays.c` 同样为了向后兼容性, 我们不想改变原始 IRQ/SOFTIRQ 延迟的含义, 相反, 我们可以通过原始 IRQ/OFTIRQ 的延迟减去该补丁添加的 SOFTIREQ 延迟来获得真实的 IRQ(中断) 延迟. | v1 ☐☑✓ | [LORE v1,0/3](https://lore.kernel.org/all/20240402112415.GA17946@didi-ThinkCentre-M930t-N000) |
| 2024/03/29 | Chunxin Zang | [sched/fair: Reset vlag in dequeue when PLAGE_LAG is disabled](https://lore.kernel.org/all/20240329091933.340739-1-spring.cxz@gmail.com) | TODO | v1 ☐☑✓ | [LORE](https://lore.kernel.org/all/20240329091933.340739-1-spring.cxz@gmail.com) |
| 2024/04/03 | Pierre Gondois | [sched/fair|isolation: Correctly clear nohz.[nr_cpus|idle_cpus_mask] for isolated CPUs](https://lore.kernel.org/all/20240403150543.2793354-1-pierre.gondois@arm.com) | TODO | v1 ☐☑✓ | [LORE v1,0/7](https://lore.kernel.org/all/20240403150543.2793354-1-pierre.gondois@arm.com) |
@@ -681,8 +674,6 @@ cba6167f0adb
[Memory Sealing"mseal"System Call Merged For Linux 6.10](https://www.phoronix.com/news/Linux-6.10-Merges-mseal)
-
-
| 2024/05/27 | Tero Kristo | [Intel Performance Limit Reasons support](https://lore.kernel.org/all/20240527133400.483634-1-tero.kristo@linux.intel.com) | 英特尔性能限制原因可以报告为什么性能 / 功耗在芯片级别或芯片内的单个 CPU 内核受到限制. 今天, 随着 Linux 内核邮件列表的一组新补丁的发布, 英特尔 PLR 硬件性能事件报告正在连接中. 这些信息通过 DebugFS 传达到用户空间, 供管理员直接访问, 或者供其他应用程序了解为什么他们的 CPU 性能可能受到限制. 对于英特尔性能限制原因提出的 Linux 补丁, 信息通过 `/sys/kernel/debug/tpmi-*/plr/domain*/status` 上报. 但是, 与 DebugFS 一样, `/sys/kernel/debug/` 的访问通常需要 ROOT 权限. 该组补丁提供了一个 INTEL_PLR_TPMI 的 Kconfig 选项, 用于控制此英特尔 PLR 驱动程序. 参见 phoronix 报道 [Intel Performance Limit Reasons For Linux To Report Why Your CPU Is Downclocking](https://www.phoronix.com/news/Intel-Perf-Limit-Reasons-Linux) | v2 ☐☑✓ | [LORE v2,0/6](https://lore.kernel.org/all/20240527133400.483634-1-tero.kristo@linux.intel.com) |
| 2024/02/26 | Lai Jiangshan | [KVM: x86/PVM: Introduce a new hypervisor](https://lore.kernel.org/all/20240226143630.33643-1-jiangshanlai@gmail.com) | TODO | v1 ☐☑✓ | [LORE v1,0/73](https://lore.kernel.org/all/20240226143630.33643-1-jiangshanlai@gmail.com) |
| 2020/05/04 | Alexandre Chartre | [ASI - Part I (ASI Infrastructure and PTI)](https://lore.kernel.org/all/20200504144939.11318-1-alexandre.chartre@oracle.com) | TODO | v4 ☐☑✓ | [LORE v4,0/7](https://lore.kernel.org/all/20200504144939.11318-1-alexandre.chartre@oracle.com) |
@@ -698,10 +689,10 @@ cba6167f0adb
[WeWe-RSS](https://help.railway.app/templates/we-we-rss-d75eade8)
[免费部署 wewe-rss 服务](https://stupidjoey.net/posts/deploy_wewe_rss/)
[一键部署属于自己的微信公众号 RSS(wewe-rss)](https://foxistudy.com/posts/wewe-rss/)
-
[鄙人使用 huggingface 和 railway 搭建的公众号订阅](https://huggingface.co/spaces/gatieme/wewe-rss)
+[松鼠快看 - 公众号订阅服务](https://songshukuaikan.com/login)
@@ -757,4 +748,10 @@ HUAWEI P10 Plus, Vicky, Android 7.0, EMUI 5.1
-[issue: introduce scheduler BPF](https://gitee.com/openeuler/kernel/issues/I5F6X6), [Introduce programmable base on bpf for scheduler](https://gitee.com/openeuler/kernel/issues/I8OIT1), [pulls/4053, sched: basic infrastructure for scheduler bpf](https://gitee.com/openeuler/kernel/pulls/4053)
\ No newline at end of file
+
+
+[New Power Sequencing Driver Subsystem Merged For Linux 6.11](https://www.phoronix.com/news/Linux-6.11-Power-Sequencing)
+
+
+Silva 提出了一系列旨在提高灵活数组使用安全性的措施, 包括:
引入 `__counted_by` 宏来注解结构体中的变长数组, 以帮助编译器进行边界检查.
+提升编译器警告级别, 以捕捉零长度数组的使用, 尤其是那些可能被误解为灵活数组的情况.
集成测试到自动测试机器人中, 以捕获对类型转换的不当使用, 类似于在 atomic_t 转换为 recount_t 时所做的.
\ No newline at end of file