Linux hibernate的简单过程
来源:互联网 发布:詹姆斯12年总决赛数据 编辑:程序博客网 时间:2024/06/10 00:43
这几天应上级只要求,survey一下Linux的hibernate,侧重于CPU的operation。
有一份PPT可以参考,可惜不能下载,链接是:
http://www.slideshare.net/varunmahajan06/hibernation-linux-2629
进去之后,如果有问题,那你自己在网站中search“Linux Hibernate”这2个关键字,就能找到。
另外,我整理出了一个简单的代码树,供大家参考。
hibernate (kernel/power/hibernate.c)
|- hibernation_snapshot
| |- create_images
| |- disable_nonboot_cpus (kernel/cpu.c)
| | |- _cpu_down
| | | |- take_cpu_down
| | | | |- __cpu_disable (arch/x86/include/asm/smp.h) // Ensure this CPU doesn't handle any more interrupts
| | | | |- native_cpu_disable (arch/x86/kernel/Smpboot.c)
| | | |- __cpu_die (arch/x86/include/asm/smp.h) // This actually kills the CPU
| | | |- native_cpu_die (arch/x86/kernel/Smpboot.c)
| | |
| | |- cpumask_set_cpu (include/linux/cpumask.h)
| |
| |- in_suspend = 1;
| |
| |- save_processor_state (arch/x86/power/cpu.c)
| | |- __save_processor_state
| |
| |- swsusp_arch_suspend (arch/x86/power/hibernate_asm_32.S)
| | |- swsusp_save (kernel/power/snapshot.c)
| |
| |- restore_processor_state (arch/x86/power/cpu.c)
| |
| |- enable_nonboot_cpus (kernel/cpu.c)
|
|- if (in_suspend)
{
swsusp_write;
power_down;
in_suspend = 0;
}
software_resume (kernel/power/hibernate.c)
|- hibernation_restore // If successful, control returns after hibernation_snapshot->create_images->swsusp_arch_suspend
|- resume_target_kernel
|- disable_nonboot_cpus (kernel/cpu.c)
|- swsusp_arch_resume (arch/x86/power/Hibernate_32.c)
| |- restore_image (arch/x86/power/hibernate_asm_32.S)
|- // The code below is only ever reached in case of a failure.
- Linux hibernate的简单过程
- hibernate的一次简单执行过程
- Hibernate学习一:配置及简单实例的创建过程
- 一个简单的linux脚本创建过程
- Linux下helloworld的简单编译过程
- 简单linux启动过程
- Hibernate的创建过程
- Hibernate的工作过程
- Hibernate的执行过程
- Linux中编译一个简单的源文件的过程
- Hibernate的简单应用
- Hibernate的简单应用
- 简单的hibernate实例
- 简单的 Hibernate Test
- Hibernate的简单例子
- Hibernate 简单的TestMain
- Hibernate 简单的annotation
- Hibernate的简单使用
- 二项式定理(Java实现及代码重审)
- 《重构》 — Java示例:影片出租店程序(4、添加功能)
- android:aidl
- 三层架构中web.config配置文件使用
- C++的多态性
- Linux hibernate的简单过程
- 设立新岗位来做好企业信息安全
- tree 树 详解
- nofollow属性的介绍和使用
- 针对 IBM Lotus Notes 开发人员的性能基础知识
- UVA 10139 判断n的阶乘能否被m整除
- 源码统计工具SourceCounter
- 有效利用 Domino/Notes 缓存(Cache)机制
- 《重构》 — Delphi示例:影片出租店程序(4、添加功能)