kernel suspend
2016-09-28 10:49:07 0 举报
kernel suspend逻辑
作者其他创作
大纲/内容
mstar_pm_enter
PM Power Down
N
enter_state/*off mem sleep state*/
enter_state/*mem sleep state*/
If Not wakeup event
Freeze User Space and Kernel Process
early_suspend
early_resume
Y
PowerManagerService/*request wakeup by user*/
注意:休眠过程:这个只是简化的流程,实际还需要考虑很多情况,整个绿色标示过程中用户都有可能按下遥控器PowerKey或者触发其他wakeup event,都将导致系统完全唤醒,或者该过程遇到错误,系统后台局部唤醒然后等待条件满足重新执行suspend。该过程执行的时间是不确定的。wakeup event是由wakeup source产生,系统指定的wakeup source不会被suspend唤醒过程:类似,由PowerManagerService向节点/sys/power/state写入off终止休眠
suspend devices
PowerManagerService/*request sleep by user*/
resume devices
If has wakeup evnet or freeze process failed
exitStrMode
thaw all processes
enterStrMode/*echo mem /sys/power/state*/
If has wake_lock
If has wake up event or suspend failed
Kernel Mode
0 条评论
下一页