Documentation/translations/zh_CN/scheduler/sched-arch.rst

Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/scheduler/sched-arch.rst

File Facts

System
Linux kernel
Corpus path
Documentation/translations/zh_CN/scheduler/sched-arch.rst
Extension
.rst
Size
2677 bytes
Lines
72
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

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问题(并试图解决或没有解决)。:

sparc - 在这一点上,IRQ是开着的(?),把local_irq_save改为_disable。
      - 待办事项: 需要第二个CPU来禁用抢占 (参考 #1)

Annotation

Implementation Notes