这几天应上级只要求,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
| | | |-