From 8f65682ee4a2d964b3bd4eca6cdfb7d89564e1c5 Mon Sep 17 00:00:00 2001 From: gatieme Date: Sun, 12 Dec 2021 22:36:50 +0800 Subject: [PATCH] description/scheduler: TTWU --- study/kernel/00-DESCRIPTION/SCHEDULER.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/study/kernel/00-DESCRIPTION/SCHEDULER.md b/study/kernel/00-DESCRIPTION/SCHEDULER.md index 92c2fc3..812734b 100644 --- a/study/kernel/00-DESCRIPTION/SCHEDULER.md +++ b/study/kernel/00-DESCRIPTION/SCHEDULER.md @@ -924,16 +924,14 @@ idle balance 中执行 update_blocked_average 是很费时费力的, 可以做 ## 4.8 WAKEUP ------- +通常我们将 WAKEUP 的流程划分为两块: -### 4.8.1 child runs first -------- +- [x] 1. TTWU: waker 唤醒 wakee 线程, 将 wakee 线程从 S/D 等状态唤醒到 R 状态. -| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 | -|:----:|:----:|:---:|:---:|:----------:|:----:| -| 2021/09/12 | Yang Yang / | [sched: Add a new version sysctl to control child runs first](https://lkml.org/lkml/2021/9/12/4) | 旧版本的 sysctl_sched_child_runs_first 有一些问题. 首先, 它允许设置值大于 1, 这是不必要的. 其次, 它没有遵循能力法则. 第三, 它没有使用 static key. 这个新版本修复了所有问题. | v1 ☐ | [LKML](https://lkml.org/lkml/2021/9/12/4) | +- [x] 2. select_task_rq WF_TTWU: waker 为 wakee 选择一个合适的 CPU 供其运行. -### 4.8.2 Optimize TTWU(try_to_wake_up) +### 4.8.1 Optimize TTWU(try_to_wake_up) ------- | 时间 | 特性 | 描述 | 是否合入主线 | 链接 | @@ -942,7 +940,7 @@ idle balance 中执行 update_blocked_average 是很费时费力的, 可以做 -### 4.8.3 WAKE_AFFINE +### 4.8.2 WAKE_AFFINE ------- * smark wake_affine @@ -984,6 +982,14 @@ Mike Galbraith 调试发现, 触发这个问题的原因是因为 wake_affine_we | 2021/10/28 | Mel Gorman | [Reduce stacking and overscheduling](https://lkml.org/lkml/2021/10/21/661) | Mike Galbraith 发现引起 CPU 上任务堆积的原因是 wake_affine_weight() 流程与 cpu_load() 更新路径的互不感知造成的, 因此进行了修复. | v1 ☐ | [2021/10/21 LKML 0/2](https://lkml.org/lkml/2021/10/21/661), [2021/10/28 LKML v4 0/2](https://lkml.org/lkml/2021/10/28/226),[LORE 1/1](https://lore.kernel.org/all/20211125151915.8628-1-mgorman@techsingularity.net/), [LORE v4,0/2](https://lore.kernel.org/lkml/20211028094834.1312-1-mgorman@techsingularity.net) | +### 4.8.3 child runs first +------- + +| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 | +|:----:|:----:|:---:|:---:|:----------:|:----:| +| 2021/09/12 | Yang Yang / | [sched: Add a new version sysctl to control child runs first](https://lkml.org/lkml/2021/9/12/4) | 旧版本的 sysctl_sched_child_runs_first 有一些问题. 首先, 它允许设置值大于 1, 这是不必要的. 其次, 它没有遵循能力法则. 第三, 它没有使用 static key. 这个新版本修复了所有问题. | v1 ☐ | [LKML](https://lkml.org/lkml/2021/9/12/4) | + + # 5 select_task_rq -------