docs/zh_CN: add scheduler arch and bwc translation
Subsystems (2)
v3 cover docs/zh_CN: add scheduler arch and bwc translation
v3:
* remove unused label.
v2:
* Pick Reviewed-by tag. (Patch 2/3 and 3/3)
* Modified some words under Alex's advices.
v1:
* Translate .../scheduler/sched-arch.rst and sched-bwc.rst into Chinese.
* When I translated sched-bwc, I fixed some errata along the way.
* fix a build warning in sched-bwc,I put them inside a patch or even in a series, so if I should split them, please let me know.
Yanteng Si (3):
docs/zh_CN: add scheduler sched-arch translation docs/zh_CN: add scheduler sched-bwc translation docs/scheduler: fix typo and warning in sched-bwc
Documentation/scheduler/sched-bwc.rst | 5 +- .../translations/zh_CN/scheduler/index.rst | 3 +- .../zh_CN/scheduler/sched-arch.rst | 76 +++++++ .../zh_CN/scheduler/sched-bwc.rst | 204 ++++++++++++++++++ 4 files changed, 284 insertions(+), 4 deletions(-) create mode 100644 Documentation/translations/zh_CN/scheduler/sched-arch.rst create mode 100644 Documentation/translations/zh_CN/scheduler/sched-bwc.rst
Signature · 1 line
2.27.0
PATCH v3 1/3 docs/zh_CN: add scheduler sched-arch translation
From: Yanteng Si <[email protected]>
Translate .../scheduler/sched-arch.rst into Chinese.
--- .../translations/zh_CN/scheduler/index.rst | 2 +- .../zh_CN/scheduler/sched-arch.rst | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/scheduler/sched-arch.rst
Documentation/translations/zh_CN/scheduler/index.rst +1 -1
@@ -20,11 +20,11 @@ Linux调度器 :maxdepth: 1 completion + sched-arch TODOList: - sched-arch sched-bwc sched-deadline sched-design-CFS
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
2.27.0
Re: [PATCH v3 1/3] docs/zh_CN: add scheduler sched-arch translation
Quoted 112 lines · Yanteng Si <[email protected]> 于2021年12月3日周五 16:04写道:
From: Yanteng Si <[email protected]>
Translate
.../scheduler/sched-arch.rstinto Chinese.Signed-off-by Yanteng Si <[email protected]>--- .../translations/zh_CN/scheduler/index.rst | 2 +- .../zh_CN/scheduler/sched-arch.rst | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/scheduler/sched-arch.rstDocumentation/translations/zh_CN/scheduler/index.rst +1
-1@@ -20,11 +20,11 @@ Linux调度器 :maxdepth: 1 completion + sched-arch TODOList: - sched-arch sched-bwc sched-deadline sched-design-CFSDocumentation/translations/zh_CN/scheduler/sched-arch.rst new file +76
-1@@ -0,0 +1,76 @@ +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/scheduler/sched-arch.rst + +:翻译: + + 司延腾 Yanteng Si <[email protected]> + +:校译: + + + +=============================== +架构特定代码的CPU调度器实现提示 +=============================== + + Nick Piggin, 2005 + +上下文切换 +========== +1. 运行队列锁 +默认情况下,switch_to arch函数在调用时锁定了运行队列。这通常不是一个问题,除非 +switch_to可能需要获取运行队列锁。这通常是由于上下文切换中的唤醒操作造成的。见 +arch/ia64/include/asm/switch_to.h的例子。 + +为了要求调度器在运行队列解锁的情况下调用switch_to,你必须在头文件 +中`#define __ARCH_WANT_UNLOCKED_CTXSW`(通常是定义switch_to的那个文件)。 + +在CONFIG_SMP的情况下,解锁的上下文切换对核心调度器的实现只带来了非常小的性能损 +失。 + +CPU空转 +======= +你的cpu_idle程序需要遵守以下规则: + +1. 现在抢占应该在空闲的例程上禁用。应该只在调用schedule()时启用,然后再禁用。 + +2. need_resched/TIF_NEED_RESCHED 只会被设置,并且在运行任务调用 schedule() + 之前永远不会被清除。空闲线程只需要查询need_resched,并且永远不会设置或清除它。 + +3. 当cpu_idle发现(need_resched() == 'true'),它应该调用schedule()。否则 + 它不应该调用schedule()。 + +4. 在检查need_resched时,唯一需要禁用中断的情况是,我们要让处理器休眠到下一个中 + 断(这并不对need_resched提供任何保护,它可以防止丢失一个中断): + + 4a. 这种睡眠类型的常见问题似乎是:: + + local_irq_disable(); + if (!need_resched()) { + local_irq_enable(); + *** resched interrupt arrives here *** + __asm__("sleep until next interrupt"); + } + +5. 当need_resched变为高电平时,TIF_POLLING_NRFLAG可以由不需要中断来唤醒它们 + 的空闲程序设置。换句话说,它们必须定期轮询need_resched,尽管做一些后台工作或 + 进入低CPU优先级可能是合理的。 + + - 5a. 如果TIF_POLLING_NRFLAG被设置,而我们确实决定进入一个中断睡眠,那 + 么需要清除它,然后发出一个内存屏障(接着测试need_resched,禁用中断,如3中解释)。 + +arch/x86/kernel/process.c有轮询和睡眠空闲函数的例子。 + + +可能出现的arch/问题 +=================== + +我发现的可能的arch问题(并试图解决或没有解决)。: + +ia64 - safe_halt的调用与中断相比,是否很荒谬? (它睡眠了吗) (参考 #4a) + +sh64 - 睡眠与中断相比,是否很荒谬? (参考 #4a) + +sparc - 在这一点上,IRQ是开着的(?),把local_irq_save改为_disable。 + - 待办事项: 需要第二个CPU来禁用抢占 (参考 #1) --
Quoted 2 lines
2.27.0
CC Yizhou [email protected]
Thanks,
Yanteng
Re: [PATCH v3 1/3] docs/zh_CN: add scheduler sched-arch translation
Quoted 60 lines · yanteng si
Quoted 59 lines · Yanteng Si <[email protected]> 于2021年12月3日周五 16:04写道:
From: Yanteng Si <[email protected]>
Translate
.../scheduler/sched-arch.rstinto Chinese.Signed-off-by Yanteng Si <[email protected]>--- .../translations/zh_CN/scheduler/index.rst | 2 +- .../zh_CN/scheduler/sched-arch.rst | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/scheduler/sched-arch.rstDocumentation/translations/zh_CN/scheduler/index.rst +1
-1@@ -20,11 +20,11 @@ Linux调度器 :maxdepth: 1 completion + sched-arch TODOList: - sched-arch sched-bwc sched-deadline sched-design-CFSDocumentation/translations/zh_CN/scheduler/sched-arch.rst new file +24
-0@@ -0,0 +1,76 @@ +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/scheduler/sched-arch.rst + +:翻译: + + 司延腾 Yanteng Si <[email protected]> + +:校译: + + + +=============================== +架构特定代码的CPU调度器实现提示 +=============================== + + Nick Piggin, 2005 + +上下文切换 +========== +1. 运行队列锁 +默认情况下,switch_to arch函数在调用时锁定了运行队列。这通常不是一个问题,除非 +switch_to可能需要获取运行队列锁。这通常是由于上下文切换中的唤醒操作造成的。见 +arch/ia64/include/asm/switch_to.h的例子。
Quoted 8 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 32
Quoted 8 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +8
-0+ +为了要求调度器在运行队列解锁的情况下调用switch_to,你必须在头文件 +中`#define __ARCH_WANT_UNLOCKED_CTXSW`(通常是定义switch_to的那个文件)。 + +在CONFIG_SMP的情况下,解锁的上下文切换对核心调度器的实现只带来了非常小的性能损 +失。 + +CPU空转
这里别翻译比较好,CPU idle是一个特性。空转肯定不对。
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 39
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +6
-0+======= +你的cpu_idle程序需要遵守以下规则: + +1. 现在抢占应该在空闲的例程上禁用。应该只在调用schedule()时启用,然后再禁>> + +2. need_resched/TIF_NEED_RESCHED 只会被设置,并且在运行任务调用 schedule() + 之前永远不会被清除。空闲线程只需要查询need_resched,并且永远不会设置或清除它。
空闲 -> idle
Quoted 9 lines
Quoted 9 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +9
-0+ +3. 当cpu_idle发现(need_resched() == 'true'),它应该调用schedule()。否则 + 它不应该调用schedule()。 + +4. 在检查need_resched时,唯一需要禁用中断的情况是,我们要让处理器休眠到下一个中 + 断(这并不对need_resched提供任何保护,它可以防止丢失一个中断): + + 4a. 这种睡眠类型的常见问题似乎是:: +
Quoted 8 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 56
Quoted 8 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +8
-0+ local_irq_disable(); + if (!need_resched()) { + local_irq_enable(); + *** resched interrupt arrives here *** + __asm__("sleep until next interrupt"); + } + +5. 当need_resched变为高电平时,TIF_POLLING_NRFLAG可以由不需要中断来唤醒它们
高电平:我觉得可以加个“(译注:为真)”
Quoted 1 line
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 57
Quoted 1 line
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +1
-0+ 的空闲程序设置。换句话说,它们必须定期轮询need_resched,尽管做一些后台工作或
可以由不需要中断来唤醒它们的空闲程序设置 -> 可以由不需要中断唤醒的idle例程设置
Quoted 4 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 61
Quoted 4 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +4
-0+ 进入低CPU优先级可能是合理的。 + + - 5a. 如果TIF_POLLING_NRFLAG被设置,而我们确实决定进入一个中断睡眠,那 + 么需要清除它,然后发出一个内存屏障(接着测试need_resched,禁用中断,如3中解释)。
接着测试need_resched,禁用中断 -> 接着在禁用中断的条件下测试need_resched
Quoted 2 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 62
Quoted 2 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +2
-0+ +arch/x86/kernel/process.c有轮询和睡眠空闲函数的例子。
空闲 可以不翻译
Quoted 8 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 71
Quoted 8 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +8
-0+ + +可能出现的arch/问题 +=================== + +我发现的可能的arch问题(并试图解决或没有解决)。: + +ia64 - safe_halt的调用与中断相比,是否很荒谬? (它睡眠了吗) (参考 #4a)
safe_halt的调用与中断相比,是否很荒谬 -> safe_halt的调用是否与中断发生了竞争
Quoted 2 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 72
Quoted 2 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +2
-0+ +sh64 - 睡眠与中断相比,是否很荒谬? (参考 #4a)
睡眠与中断相比,是否很荒谬 -> 睡眠和中断发生竞争了吗
Quoted 9 lines
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +3
-1+ +sparc - 在这一点上,IRQ是开着的(?),把local_irq_save改为_disable。 + - 待办事项: 需要第二个CPU来禁用抢占 (参考 #1) --2.27.0
CC Yizhou [email protected]
Quoted 3 lines
Thanks,
Yanteng
总的来看,这篇文章太老了,我觉得可以邀请原作者更新一下...
Re: [PATCH v3 1/3] docs/zh_CN: add scheduler sched-arch translation
Quoted 64 lines · Tang Yizhou <[email protected]> 于2021年12月6日周一 16:24写道:
Quoted 62 lines · yanteng si
Quoted 61 lines · Yanteng Si <[email protected]> 于2021年12月3日周五 16:04写道:
From: Yanteng Si <[email protected]>
Translate
.../scheduler/sched-arch.rstinto Chinese.Signed-off-by Yanteng Si <[email protected]>--- .../translations/zh_CN/scheduler/index.rst | 2 +- .../zh_CN/scheduler/sched-arch.rst | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/scheduler/sched-arch.rstDocumentation/translations/zh_CN/scheduler/index.rst +1
-1@@ -20,11 +20,11 @@ Linux调度器 :maxdepth: 1 completion + sched-arch TODOList: - sched-arch sched-bwc sched-deadline sched-design-CFSDocumentation/translations/zh_CN/scheduler/sched-arch.rst new file +26
-0@@ -0,0 +1,76 @@ +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/scheduler/sched-arch.rst + +:翻译: + + 司延腾 Yanteng Si <[email protected]> + +:校译: + + + +=============================== +架构特定代码的CPU调度器实现提示 +=============================== + + Nick Piggin, 2005 + +上下文切换 +========== +1. 运行队列锁 +默认情况下,switch_to arch函数在调用时锁定了运行队列。这通常不是一个问题,除非 +switch_to可能需要获取运行队列锁。这通常是由于上下文切换中的唤醒操作造成的。见 +arch/ia64/include/asm/switch_to.h的例子。 + +为了要求调度器在运行队列解锁的情况下调用switch_to,你必须在头文件
Quoted 8 lines
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 32
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +6
-0+中`#define __ARCH_WANT_UNLOCKED_CTXSW`(通常是定义switch_to的那个文件)。 + +在CONFIG_SMP的情况下,解锁的上下文切换对核心调度器的实现只带来了非常小的性能损 +失。 + +CPU空转这里别翻译比较好,CPU idle是一个特性。空转肯定不对。
If you can explain what cpu idle is, I'll use idle. :)
Quoted 21 lines
Quoted 7 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 39
Quoted 7 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +6
-0+======= +你的cpu_idle程序需要遵守以下规则: + +1. 现在抢占应该在空闲的例程上禁用。应该只在调用schedule()时启用,然后再禁>> + +2. need_resched/TIF_NEED_RESCHED 只会被设置,并且在运行任务调用 schedule() + 之前永远不会被清除。空闲线程只需要查询need_resched,并且永远不会设置或清除它。空闲 -> idle
Quoted 11 lines
Quoted 11 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +11
-0+ +3. 当cpu_idle发现(need_resched() == 'true'),它应该调用schedule()。否则 + 它不应该调用schedule()。 + +4. 在检查need_resched时,唯一需要禁用中断的情况是,我们要让处理器休眠到下一个中 + 断(这并不对need_resched提供任何保护,它可以防止丢失一个中断): + + 4a. 这种睡眠类型的常见问题似乎是:: + + local_irq_disable(); + if (!need_resched()) {
Quoted 8 lines
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 56
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +6
-0+ local_irq_enable(); + *** resched interrupt arrives here *** + __asm__("sleep until next interrupt"); + } + +5. 当need_resched变为高电平时,TIF_POLLING_NRFLAG可以由不需要中断来唤醒它们高电平:我觉得可以加个“(译注:为真)”
Agree!
Quoted 11 lines
Quoted 2 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 57
Quoted 2 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +1
-0+ 的空闲程序设置。换句话说,它们必须定期轮询need_resched,尽管做一些后台工作或可以由不需要中断来唤醒它们的空闲程序设置 -> 可以由不需要中断唤醒的idle例程设置
Quoted 4 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 61
Quoted 4 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +4
-0+ 进入低CPU优先级可能是合理的。 + + - 5a. 如果TIF_POLLING_NRFLAG被设置,而我们确实决定进入一个中断睡眠,那 + 么需要清除它,然后发出一个内存屏障(接着测试need_resched,禁用中断,如3中解释)。接着测试need_resched,禁用中断 -> 接着在禁用中断的条件下测试need_resched
OK, thanks!
Quoted 5 lines
Quoted 3 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 62
Quoted 3 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +2
-0+ +arch/x86/kernel/process.c有轮询和睡眠空闲函数的例子。空闲 可以不翻译
OK, thanks!
Quoted 11 lines
Quoted 9 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 71
Quoted 9 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +8
-0+ + +可能出现的arch/问题 +=================== + +我发现的可能的arch问题(并试图解决或没有解决)。: + +ia64 - safe_halt的调用与中断相比,是否很荒谬? (它睡眠了吗) (参考 #4a)safe_halt的调用与中断相比,是否很荒谬 -> safe_halt的调用是否与中断发生了竞争
OK, thanks!
Quoted 5 lines
Quoted 3 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 72
Quoted 3 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +2
-0+ +sh64 - 睡眠与中断相比,是否很荒谬? (参考 #4a)睡眠与中断相比,是否很荒谬 -> 睡眠和中断发生竞争了吗
OK, thanks!
Quoted 10 lines
Quoted 10 lines
Quoted 7 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +3
-1+ +sparc - 在这一点上,IRQ是开着的(?),把local_irq_save改为_disable。 + - 待办事项: 需要第二个CPU来禁用抢占 (参考 #1) --2.27.0
CC Yizhou [email protected]
Quoted 5 lines
Quoted 3 lines
Thanks,
Yanteng总的来看,这篇文章太老了,我觉得可以邀请原作者更新一下...
In fact, I appreciate you doing it even more. :-)
BTW:
The mailing list has many friends who are not good at Chinese, so let's communicate in English.
Thanks,
Yanteng
Re: [PATCH v3 1/3] docs/zh_CN: add scheduler sched-arch translation
Quoted 73 lines · yanteng si
Quoted 64 lines · Tang Yizhou <[email protected]> 于2021年12月6日周一 16:24写道:
Quoted 62 lines · yanteng si
Quoted 61 lines · Yanteng Si <[email protected]> 于2021年12月3日周五 16:04写道:
From: Yanteng Si <[email protected]>
Translate
.../scheduler/sched-arch.rstinto Chinese.Signed-off-by Yanteng Si <[email protected]>--- .../translations/zh_CN/scheduler/index.rst | 2 +- .../zh_CN/scheduler/sched-arch.rst | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/scheduler/sched-arch.rstDocumentation/translations/zh_CN/scheduler/index.rst +1
-1@@ -20,11 +20,11 @@ Linux调度器 :maxdepth: 1 completion + sched-arch TODOList: - sched-arch sched-bwc sched-deadline sched-design-CFSDocumentation/translations/zh_CN/scheduler/sched-arch.rst new file +26
-0@@ -0,0 +1,76 @@ +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/scheduler/sched-arch.rst + +:翻译: + + 司延腾 Yanteng Si <[email protected]> + +:校译: + + + +=============================== +架构特定代码的CPU调度器实现提示 +=============================== + + Nick Piggin, 2005 + +上下文切换 +========== +1. 运行队列锁 +默认情况下,switch_to arch函数在调用时锁定了运行队列。这通常不是一个问题,除非 +switch_to可能需要获取运行队列锁。这通常是由于上下文切换中的唤醒操作造成的。见 +arch/ia64/include/asm/switch_to.h的例子。 + +为了要求调度器在运行队列解锁的情况下调用switch_to,你必须在头文件Quoted 8 lines
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 32
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +6
-0+中`#define __ARCH_WANT_UNLOCKED_CTXSW`(通常是定义switch_to的那个文件)。 + +在CONFIG_SMP的情况下,解锁的上下文切换对核心调度器的实现只带来了非常小的性能损 +失。 + +CPU空转这里别翻译比较好,CPU idle是一个特性。空转肯定不对。
Quoted 1 line
If you can explain what cpu idle is, I'll use idle. :)
Alex, I want to discuss how to translate the terms (especially nouns) of computer science and engineering into Chinese.
IMHO, terms of computer science and engineering are much different from terms in other science and engineering disciplines as they usually come from our daily life. Maybe it is much better not to translate them and just keep the English terms there. For example, there isn't a conventional Chinese translate of 'CPU idle'. We don't need to be the first to give it a Chinese translation. Should we translate them into Chinese, I feel awkward because the rest of the text is serious and rigorous.
On the other hand, an experienced Chinese kernel developer may be confused when read the Chinese translations of kernel feature names, e.g. 'CPU idle' here. People who can read the kernel documentation are not babies, and they at least have some English fundamentals.
Futhermore, I think it will be clarified more clearly if we both provide English and Chinese at the same time in the case when there isn't a conventional Chinese translate but we do want to provide one.
The above principles are applied in my recent translation of sched-capacity.rst. You can also comment there.
Thanks,
Tang.
Quoted 91 lines
Quoted 21 lines
Quoted 7 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 39
Quoted 7 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +6
-0+======= +你的cpu_idle程序需要遵守以下规则: + +1. 现在抢占应该在空闲的例程上禁用。应该只在调用schedule()时启用,然后再禁>> + +2. need_resched/TIF_NEED_RESCHED 只会被设置,并且在运行任务调用 schedule() + 之前永远不会被清除。空闲线程只需要查询need_resched,并且永远不会设置或清除它。空闲 -> idle
Quoted 11 lines
Quoted 11 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +11
-0+ +3. 当cpu_idle发现(need_resched() == 'true'),它应该调用schedule()。否则 + 它不应该调用schedule()。 + +4. 在检查need_resched时,唯一需要禁用中断的情况是,我们要让处理器休眠到下一个中 + 断(这并不对need_resched提供任何保护,它可以防止丢失一个中断): + + 4a. 这种睡眠类型的常见问题似乎是:: + + local_irq_disable(); + if (!need_resched()) {Quoted 8 lines
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 56
Quoted 6 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +6
-0+ local_irq_enable(); + *** resched interrupt arrives here *** + __asm__("sleep until next interrupt"); + } + +5. 当need_resched变为高电平时,TIF_POLLING_NRFLAG可以由不需要中断来唤醒它们高电平:我觉得可以加个“(译注:为真)”
Agree!
Quoted 11 lines
Quoted 2 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 57
Quoted 2 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +1
-0+ 的空闲程序设置。换句话说,它们必须定期轮询need_resched,尽管做一些后台工作或可以由不需要中断来唤醒它们的空闲程序设置 -> 可以由不需要中断唤醒的idle例程设置
Quoted 4 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 61
Quoted 4 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +4
-0+ 进入低CPU优先级可能是合理的。 + + - 5a. 如果TIF_POLLING_NRFLAG被设置,而我们确实决定进入一个中断睡眠,那 + 么需要清除它,然后发出一个内存屏障(接着测试need_resched,禁用中断,如3中解释)。接着测试need_resched,禁用中断 -> 接着在禁用中断的条件下测试need_resched
OK, thanks!
Quoted 5 lines
Quoted 3 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 62
Quoted 3 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +2
-0+ +arch/x86/kernel/process.c有轮询和睡眠空闲函数的例子。空闲 可以不翻译
OK, thanks!
Quoted 11 lines
Quoted 9 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 71
Quoted 9 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +8
-0+ + +可能出现的arch/问题 +=================== + +我发现的可能的arch问题(并试图解决或没有解决)。: + +ia64 - safe_halt的调用与中断相比,是否很荒谬? (它睡眠了吗) (参考 #4a)safe_halt的调用与中断相比,是否很荒谬 -> safe_halt的调用是否与中断发生了竞争
OK, thanks!
Quoted 5 lines
Quoted 3 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst line 72
Quoted 3 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +2
-0+ +sh64 - 睡眠与中断相比,是否很荒谬? (参考 #4a)睡眠与中断相比,是否很荒谬 -> 睡眠和中断发生竞争了吗
OK, thanks!
Quoted 10 lines
Quoted 10 lines
Quoted 7 lines
Documentation/translations/zh_CN/scheduler/sched-arch.rst new file +3
-1+ +sparc - 在这一点上,IRQ是开着的(?),把local_irq_save改为_disable。 + - 待办事项: 需要第二个CPU来禁用抢占 (参考 #1) --2.27.0
CC Yizhou [email protected]
Quoted 5 lines
Quoted 3 lines
Thanks,
Yanteng总的来看,这篇文章太老了,我觉得可以邀请原作者更新一下...
In fact, I appreciate you doing it even more. :-)
BTW:
The mailing list has many friends who are not good at Chinese, so let's communicate in English.
Thanks,
Yanteng
Re: [PATCH v3 1/3] docs/zh_CN: add scheduler sched-arch translation
Quoted 13 lines · Tang Yizhou
Quoted 2 lines
Quoted 1 line
这里别翻译比较好,CPU idle是一个特性。空转肯定不对。
If you can explain what cpu idle is, I'll use idle. :)
Alex, I want to discuss how to translate the terms (especially nouns) of computer science and engineering into Chinese.
IMHO, terms of computer science and engineering are much different from terms in other science and engineering disciplines as they usually come from our daily life. Maybe it is much better not to translate them and just keep the English terms there. For example, there isn't a conventional Chinese translate of 'CPU idle'. We don't need to be the first to give it a Chinese translation. Should we translate them into Chinese, I feel awkward because the rest of the text is serious and rigorous.
Quoted 7 lines
On the other hand, an experienced Chinese kernel developer may be confused when read the Chinese translations of kernel feature names, e.g. 'CPU idle' here. People who can read the kernel documentation are not babies, and they at least have some English fundamentals.
Futhermore, I think it will be clarified more clearly if we both provide English and Chinese at the same time in the case when there isn't a conventional Chinese translate but we do want to provide one.
Right, some proper noun translation is hard and may make confusing if user read English first.
Keeping some original 'proper noun' words with the translation is a good idea. and it's ok for only
English if we can't find a satisfied translation.
Thanks
Alex
Quoted 7 lines
The above principles are applied in my recent translation of
sched-capacity.rst. You can also comment there.Thanks,
Tang.
PATCH v3 2/3 docs/zh_CN: add scheduler sched-bwc translation
In reply to Yanteng SiFrom: Yanteng Si <[email protected]>
Translate .../scheduler/sched-bwc.rst into Chinese.
--- .../translations/zh_CN/scheduler/index.rst | 1 + .../zh_CN/scheduler/sched-bwc.rst | 204 ++++++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 Documentation/translations/zh_CN/scheduler/sched-bwc.rst
Documentation/translations/zh_CN/scheduler/index.rst +1 -0
@@ -21,6 +21,7 @@ Linux调度器 completion sched-arch + sched-bwc TODOList:
Documentation/translations/zh_CN/scheduler/sched-bwc.rst new file +204 -0
204 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v3 3/3 docs/scheduler: fix typo and warning in sched-bwc
In reply to Yanteng SiFrom: Yanteng Si <[email protected]>
a) since d73df887b6b8 ("sched/fair: Add document for burstable CFS bandwidth") [cpu.cfs_quota_us: the total available run-time within a period (in] shoud be removed, let's delete it.
b) Add a period.
c) fix a build warning:
linux-next/Documentation/scheduler/sched-bwc.rst:243: WARNING: Inline emphasis start-string without end-string.
--- Documentation/scheduler/sched-bwc.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/scheduler/sched-bwc.rst +2 -3
@@ -74,7 +74,6 @@ Quota, period and burst are managed within the cpu subsystem via cgroupfs. to cgroup v1. For cgroup v2, see :ref:`Documentation/admin-guide/cgroup-v2.rst <cgroup-v2-cpu>`. -- cpu.cfs_quota_us: the total available run-time within a period (in - cpu.cfs_quota_us: run-time replenished within a period (in microseconds) - cpu.cfs_period_us: the length of a period (in microseconds) - cpu.stat: exports throttling statistics [explained further below]
@@ -135,7 +134,7 @@ cpu.stat: of the group have been throttled. - nr_bursts: Number of periods burst occurs. - burst_time: Cumulative wall-time (in nanoseconds) that any CPUs has used - above quota in respective periods + above quota in respective periods. This interface is read-only.
@@ -238,7 +237,7 @@ Examples additionally, in case accumulation has been done. With 50ms period, 20ms quota will be equivalent to 40% of 1 CPU. - And 10ms burst will be equivalent to 20% of 1 CPU. + And 10ms burst will be equivalent to 20% of 1 CPU:: # echo 20000 > cpu.cfs_quota_us /* quota = 20ms */ # echo 50000 > cpu.cfs_period_us /* period = 50ms */
Signature · 1 line
2.27.0