150 likes | 176 Views
This project by Sony Corporation aims to reduce system startup time using software suspend functionality, focusing on kernel, module, and application startup time reduction. By utilizing a system image as a file, developers can track system development progress and errors. The targeted environment includes OMAP OSK 5912 starter kit hardware and Linux kernel 2.6.11. The project explores swsusp states like Standby, Suspend to RAM, and Suspend to Disk. It also discusses the snapshot boot process, whereby a snapshot image created by the kernel is used by the boot loader for system initialization. Developers can benefit from the procedures outlined for faster startup and efficient system management.
E N D
Improvement of startup time using Software Suspend- Project Update - Sony Corporation Hiroki KAMINAGA kaminaga@sm.sony.co.jp JapanTechnicalJamboree7
Contents: • aim • swsusp functionality in detail • use of swsusp for snapshot boot JapanTechnicalJamboree7
AIM: • System startup time reduction • By using image of known system state,we try to accomplish kernel, module, andapplication startup time reduction • Other aspect • By using system image as a file, we can tracesystem development progress and error. JapanTechnicalJamboree7
Target envirionment: • Target hardware • OMAP OSK 5912 starter kit • Target software • Linux kernel 2.6.11 • Omap patch • U-boot • Arm swsusp support patch(developed and posted to ML) Hardware Features: ARM9 core operating at 192 Mhz. DSP core operating at 192 Mhz. TLV320AIC23 Stereo Codec 32 Mbyte DDR SDRAM 32 Mbyte Flash ROM RS-232 Serial Port 10 MBPS Ethernet port USB Host Port Compact flash connector On board IEEE 1149.1 JTAG JapanTechnicalJamboree7
Swsusp (1): • 3 states supported by linux • Standby state • Minimal power savings, low latency to workingsystem. Cpu retains power. ACPI S1 • Suspend to ram • Sufficient power savings, system in low-power.Memory in self refresh mod. ACPI S3 • Suspend to disk • Greatest power savings, similar to suspend to ram,mem contents written to disk. ACPI S4 JapanTechnicalJamboree7
Swsusp (2): • Swsusp is suspend to disk(or suspend to swap, `sw` stands for swap) • Save image to nor flash instead of disk • On resume, read from nor flash instead ofdisk JapanTechnicalJamboree7
Swsusp (3): • Basic flow of swsusp (suspend phase) • Freeze processes • Free unnecessary memory • Suspend devices • Make snapshot image (in memory) • Resume devices • Write snapshot image to swap • Powerdown machine Note: swsusp needs half of total memory JapanTechnicalJamboree7
Swsusp (4): • Basic flow of swsusp (resume) • Resume begin at `late_initcall` • Read image from swap to mem • Freeze process • Suspend devices • Restore snapshot image • Resume devices • Thaw processes JapanTechnicalJamboree7
Swsusp (5): • Swsusp resume takes time. • Swsusp procedure is kicked at late_initcall • Almost before init process starts • Doing I/O twice • Swap to mem (allocated mem) • Mem to mem (allocated mem to orig mem addr) • Redundant device state transitions • Device gets setup, suspend, and resume again. JapanTechnicalJamboree7
Snapshot boot (1): • Co-operate kernel side suspend/resumeand boot loader side init setups • Use snapshot image created by kernel • Boot loader does: • Power up board • Load snapshot image to original memory • Initialize and do setups for resume • Jump to resume entry point(not normal entry point) JapanTechnicalJamboree7
Snapshot boot (2): restore regs resume dev continue process KERNEL LAND init board copy image setup dev BOOT LOADER ON JapanTechnicalJamboree7
Snapshot boot (3): • Implemented in u-boot boot loader • new command: • bootss <image addr> <resume entry point> • Procedure: • Load snapshot image in flash to mem • Initialization and setups • Setup clock speed • Setup timer • Setup various MMIO registers • Enable MMU • Jump to resume entry point JapanTechnicalJamboree7
DEMO: • [[[demo of swsusp and snapshot boot]]] JapanTechnicalJamboree7
Reference: • Swsusp.txt • Documentation/power/swsusp.txt • Uboot • http://sourceforge.net/projects/u-boot/ • Suspend2 • http://www.suspend2.net JapanTechnicalJamboree7
EOF JapanTechnicalJamboree7