Download presentation
Presentation is loading. Please wait.
Published byDarlene Hart Modified over 6 years ago
1
Improvement of startup time using Software Suspend - Project Update -
Sony Corporation Hiroki KAMINAGA 2006/MAR/24 JapanTechnicalJamboree7
2
JapanTechnicalJamboree7
Contents: aim swsusp functionality in detail use of swsusp for snapshot boot 2006/MAR/24 JapanTechnicalJamboree7
3
JapanTechnicalJamboree7
AIM: System startup time reduction By using image of known system state, we try to accomplish kernel, module, and application startup time reduction Other aspect By using system image as a file, we can trace system development progress and error. 2006/MAR/24 JapanTechnicalJamboree7
4
JapanTechnicalJamboree7
Target envirionment: Target hardware OMAP OSK 5912 starter kit Target software Linux kernel 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 JTAG 2006/MAR/24 JapanTechnicalJamboree7
5
JapanTechnicalJamboree7
Swsusp (1): 3 states supported by linux Standby state Minimal power savings, low latency to working system. 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 2006/MAR/24 JapanTechnicalJamboree7
6
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 of disk 2006/MAR/24 JapanTechnicalJamboree7
7
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 Power off device, save (co)processor regs, snapshot, restore regs, poweron device, write to swap Note: swsusp needs half of total memory 2006/MAR/24 JapanTechnicalJamboree7
8
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 Check sig, alloc mem, read image, freeze process, free mem, suspend dev, poweroff dev, Save processor regs, realloc image to orig addr, restore regs, poweron dev, resume dev, free mem thaw process 2006/MAR/24 JapanTechnicalJamboree7
9
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. 2006/MAR/24 JapanTechnicalJamboree7
10
JapanTechnicalJamboree7
Snapshot boot (1): Co-operate kernel side suspend/resume and 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) 2006/MAR/24 JapanTechnicalJamboree7
11
JapanTechnicalJamboree7
Snapshot boot (2): restore regs resume dev continue process KERNEL LAND init board copy image setup dev BOOT LOADER ON 2006/MAR/24 JapanTechnicalJamboree7
12
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 2006/MAR/24 JapanTechnicalJamboree7
13
JapanTechnicalJamboree7
DEMO: [[[demo of swsusp and snapshot boot]]] 2006/MAR/24 JapanTechnicalJamboree7
14
JapanTechnicalJamboree7
Reference: Swsusp.txt Documentation/power/swsusp.txt Uboot Suspend2 2006/MAR/24 JapanTechnicalJamboree7
15
JapanTechnicalJamboree7
EOF 2006/MAR/24 JapanTechnicalJamboree7
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.