Power Management Discussion Hiroki Kaminaga Sony Corporation [email protected] [translated by [email protected]] 2005/Sept/30 JapanTechnicalJamboree4 Goal : • Want to shorten start up time of application HW Mounting Initialization drivers (Boot loader init / kernel) 1 [s]
Download ReportTranscript Power Management Discussion Hiroki Kaminaga Sony Corporation [email protected] [translated by [email protected]] 2005/Sept/30 JapanTechnicalJamboree4 Goal : • Want to shorten start up time of application HW Mounting Initialization drivers (Boot loader init / kernel) 1 [s]
Power Management Discussion Hiroki Kaminaga Sony Corporation [email protected] [translated by [email protected]] 2005/Sept/30 JapanTechnicalJamboree4 1 Goal : • Want to shorten start up time of application HW Mounting Initialization drivers (Boot loader init / kernel) 1 [s] 1 [s] 2 [s] Startup time of application 5 [s] • Processing until the application reaches to main() – Transfer of image – Dynamic linking – Global constructors • IPC Processing among applications for the whole system running 2005/Sept/30 JapanTechnicalJamboree4 2 Conventional Approaches: • Reduce dynamic linking time – prelink • Reduce time for global constructors – Put constructors in the same place(Localization effect) • Execute in place (XIP) • Demand Paging of Data Section(From Mizuyama’s presentation in the previous Jamboree) 2005/Sept/30 JapanTechnicalJamboree4 3 Our Approaches: • Use return from hibernation – (1) BIOS (Boot loader) level – (2) Kernel level – (3) BIOS + kernel 2005/Sept/30 JapanTechnicalJamboree4 4 Suspend/Resume Sequence(1): KERNEL BOOT LOADER I/O Image save save I/O init OFF 2005/Sept/30 Image I/O restore rest. ON JapanTechnicalJamboree4 5 Suspend/Resume Sequence (2): KERNEL I/O save Image save I/O I/O Image I/O boot init s.d. restore rest. BOOT LOADER OFF 2005/Sept/30 ON JapanTechnicalJamboree4 6 Suspend/Resume Sequence (3): I/O img KERNEL save save BOOT LOADER I/O img I/O init rest rest. I/O img save save I/O img I/O init rest rest. OFF 2005/Sept/30 ON JapanTechnicalJamboree4 7 Comparison of Three Approaches: • (1) BIOS (Boot loader) level – Relatively faster resume from hibernation – Complicated processing required when data integrity lost • (2) Kernel level – Can process to ensure the data integrity after resume from hibernation – Slower resume from hibernation • (3) BIOS + kernel – Fast resume from hibernation – Can process to ensure the data integrity 2005/Sept/30 JapanTechnicalJamboree4 8 Basic ideas: • Startup – Reduce processing until the un-hibernate on kernel side, using helper function of Boot loader • DEFERRED_RESUME – Start up the specified application with high priority • Saving system image – To start always with the same state • Others – Mount – Splash window – High speed shutdown 2005/Sept/30 JapanTechnicalJamboree4 9 Hibernation on Linux: • Swsusp – Included in 2.6 vanilla kernel (Documentation/power/swsusp.txt) – Author: Pavel Machek • Software suspend 2 – http://www.suspend2.net/ – Author: Nigel Cunningham 2005/Sept/30 JapanTechnicalJamboree4 10 Hibernate on Linux(comparison): swsusp suspend2 architecture i386, ppc, x86_64, ia64 i386, ppc, x86_64 Discontiguous memory ○ × Compression Encryption × × × ○ ○ ○ × × ○ ○ Suspend-to-swapfile Suspend-to-file Userland サポート Source: http://www.suspend2.net/features 2005/Sept/30 JapanTechnicalJamboree4 11 Environment: • Target board – OMAP Starter Kit (OSK 5912) • OS – Linux 2.6 • Boot loader – U-boot 2005/Sept/30 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 JapanTechnicalJamboree4 12 Work Items: • Choosing hibernation on Linux – Trying with swsusp first • • • • • • Porting to ARM Hibernation onto FLASH Saving system image High speed shutdown Hibernation on Boot loader DEFERED_RESUME 2005/Sept/30 JapanTechnicalJamboree4 13 Current status: • Investigating Suspend2 – Compression of system image – Encryption of system image • Porting Suspend2 onto ARM • Investigating U-boot – Hibernation on Boot loader side 2005/Sept/30 JapanTechnicalJamboree4 14 Demo: 2005/Sept/30 JapanTechnicalJamboree4 15 Community: • Sent ARM port patch to Suspend2 ML; Accepted favarably. • ARM ML adviced me on questions/issues 2005/Sept/30 JapanTechnicalJamboree4 16 EOF 2005/Sept/30 JapanTechnicalJamboree4 17 Congraturation! HanshinTigers won the league championship 2005/Sept/30 JapanTechnicalJamboree4 18