分享好友

×
取消 复制
PCI驱动的suspend/resume方法,在何时调用?
2020-06-22 16:13:24

问题:

就先只说PC上的。 对应的往/sys/power/state写一个字符串,会进入suspend态, 但是Linux目前就至少支持3个:

ACPI的状态 Linux的String 说明
==============================================
S1, "standby" 很低的延迟就能回到工作状态

S3, "mem", suspend-to-RAM, STR

S4, "disk" suspend-to-disk, STD,也叫Hibernation


我想请教, 是不是这3种睡眠的 路径中, 都会调用 pci驱动的suspend/resume方法? 还是有哪种不会调用?


解答:

drivers' suspend/resume are invoked at two cases:
a) device specific Dx transition, like D0->D3
b) system level sleep request with all drivers forced with a D0->D3 request

For b), normally S3/S4 are in this category. S1 by definition doesn't require due to all device contexts preserved, but at least Linux is lazy and thus reuse same S3 path for S1.

然后是我继续确认一下有没有理解错:
Oops, what does "lazy" here mean? We usually say "lazy" as doing things until they have to be done, such as "demanding page". But here seem the "lazy" means linux doesn't implement S1 path, right?

最后是得到肯定的答复
Yes, Linux treats S1/S3 exactly same.


文章来源CU社区:PCI驱动的suspend/resume方法,在何时调用?


分享好友

分享这个小栈给你的朋友们,一起进步吧。

内核源码
创建时间:2020-05-18 13:36:55
内核源码精华帖内容汇总
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

技术专家

查看更多
  • 飘絮絮絮丶
    专家
戳我,来吐槽~