Connect your device to application
Rloader,Alternative technology toachieve fast boot timefor ARM LinuxMatt Hsu                   <matt@0xlab.org>
Agenda   Motivation         Boot Time Measurement         Reduction Approach         Hibernation Based Technologies       ...
Movitation
Why Boot Time?Define boot time, pleasePower savingUser experiencesAndroids boot time is especially painfulDevices  Tablet ...
We Are Not AloneQuick boot  UbiqutousImproving meego boot-up time  Hiroshi DOYU, Nokia Sotware ArchitectBoosting up embedd...
Embedd Linux Wiki
Boot Time Measurement
Kernel spaceKernel parameter  printk.time =1  linux-2.6/scripts/show_deltaFtrace  ftrace=initcallInitcall  Enable BOOT_TRA...
User SpaceBootchart  http://www.bootchart.org/cat /proc/uptime2012.39 512.64grabserial  http://elinux.org/Grabserial
Hardware ApproachExternal instrument  Scope  Logic AnalyzerHardware timer count  Resolution is dependent on your clock sou...
Reduction Approach
Divide and ConquerBootloaderKernelUserland
BootloaderMinimal bootloader  Qi bootloader  zboot, linux boot directlyEnable I-cacheCopy kernel into base + 0x2000000 off...
KernelKernel parameter  quietPreset LPJ  Loop per jiffyDeferred initcall  include/linux/init.h  arch/arm/kernel/vmlinux.ld...
UserlandOptimize linker and loader time  Specific linker optionParallelize rc scriptApplication specific optimizationHiber...
Hibernate-Based TechnologiesSwsusp, aka software suspendSwsusp2 (TuxOnICE)
SwsuspNatviely support in x86Based on work by  TI, Teerth Reddy    https://patchwork.kernel.org/patc    h/96442/  Nokia, H...
Swsusp2/TuxOnICENot support in main linekernelProvides many features  Compression of images  Readhead  multiple thread I/O...
Rloader, (Resume Loader)
Rloader Is Nothing NewDo we really need follow normal booting process?The implementation of Rloader could be  Bootloader  ...
Booting Process Normal bootingBoottloader                  Kernel Init             init.rc, platform-specific rc   init Ke...
Make ARM HibernatedMerge patches  swsusp patch from TI/Nokia  TOI patches according to your kernel versionswap out page as...
Hardware/Software DescriptonARM OMAP3 BeagleboardKernel  2.6.32 with corresponding TOI  patchBootloader  Qi256MB RAM0xdroi...
Something before hibernatingecho 100 > /proc/sys/vm/swappinessecho -2 > /sys/power/tuxonice/image_size_limitecho 3 >/proc/...
Normal Booting Time Diagram                            25 seconds                                         GPIO signal of  ...
Hibernation Boot Time Diagram                   6 secondsPower On Reset   GPIO signal of         GPIO signal of           ...
Rloader as Kernel or Bootloader?Its a trade-off between your boot time andmanagement costMaintainence  Once kernel/TOI cha...
Further OptimizationRe-construct initcall stagesTry different algorithm out on compressingimages  http://code.google.com/p...
SummaryIts still far away from being a productFile system inconstency  Power failure as hibernationHardware solution is th...
Demo
Resourcehttp://elinux.org/Boot_Timehttp://tuxonice.net/http://gitorious.org/improving-meego-boot-up-time/t2t/commit/d29d85...
Sponsoredby       http://0xlab.org               27 May 2011
Rloader, alternative tech to achieve fast boot time for ARM Linux
Upcoming SlideShare
Loading in …5
×

Rloader, alternative tech to achieve fast boot time for ARM Linux

4,037 views

Published on

There are many approaches to speed up boot time for embedded device. One of the interesting tech is based hibernation. Rloader is based on this kind of tech.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,037
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
173
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Rloader, alternative tech to achieve fast boot time for ARM Linux

  1. 1. Connect your device to application
  2. 2. Rloader,Alternative technology toachieve fast boot timefor ARM LinuxMatt Hsu <matt@0xlab.org>
  3. 3. Agenda Motivation Boot Time Measurement Reduction Approach Hibernation Based Technologies Rloader Demo Summary Q&A
  4. 4. Movitation
  5. 5. Why Boot Time?Define boot time, pleasePower savingUser experiencesAndroids boot time is especially painfulDevices Tablet In-vechile system TV Smart Phone Camera
  6. 6. We Are Not AloneQuick boot UbiqutousImproving meego boot-up time Hiroshi DOYU, Nokia Sotware ArchitectBoosting up embedded Linux device: experience onLinux-based smarphone Samsung Electronics Co. Ltd.Swap-before-hibernate: A fast-on algorithm at OSlevel Shi-wu Lo, OS Lab, CCU
  7. 7. Embedd Linux Wiki
  8. 8. Boot Time Measurement
  9. 9. Kernel spaceKernel parameter printk.time =1 linux-2.6/scripts/show_deltaFtrace ftrace=initcallInitcall Enable BOOT_TRACER config ./scripts/bootgraph.pl boot_time >out.svg initcall_debug
  10. 10. User SpaceBootchart http://www.bootchart.org/cat /proc/uptime2012.39 512.64grabserial http://elinux.org/Grabserial
  11. 11. Hardware ApproachExternal instrument Scope Logic AnalyzerHardware timer count Resolution is dependent on your clock sourceETM (Embedded Trace Microcell) Need assisted software such as TRACE32/OpenOCD New feature in ARM Cortex seies
  12. 12. Reduction Approach
  13. 13. Divide and ConquerBootloaderKernelUserland
  14. 14. BootloaderMinimal bootloader Qi bootloader zboot, linux boot directlyEnable I-cacheCopy kernel into base + 0x2000000 offsetDMA-capable copyMulti-block read (MMC)
  15. 15. KernelKernel parameter quietPreset LPJ Loop per jiffyDeferred initcall include/linux/init.h arch/arm/kernel/vmlinux.ldsCompressed kernel UCL XZ
  16. 16. UserlandOptimize linker and loader time Specific linker optionParallelize rc scriptApplication specific optimizationHibernation based technologies
  17. 17. Hibernate-Based TechnologiesSwsusp, aka software suspendSwsusp2 (TuxOnICE)
  18. 18. SwsuspNatviely support in x86Based on work by TI, Teerth Reddy https://patchwork.kernel.org/patc h/96442/ Nokia, Hiroshi DOYU https://lists.linux- foundation.org/pipermail/linux- pm/2010-June/027422.htmlStart hibernation echo disk >/sys/power/state
  19. 19. Swsusp2/TuxOnICENot support in main linekernelProvides many features Compression of images Readhead multiple thread I/O drop pagecacheHbernation trigger eho 1 >/sys/power/tuxonice/do_hib ernation
  20. 20. Rloader, (Resume Loader)
  21. 21. Rloader Is Nothing NewDo we really need follow normal booting process?The implementation of Rloader could be Bootloader snapshot boot www.elinux.org/images/3/37/Snapshot-boot-final.pdf Custom kernel Kernel with software resume supportDifferent hibernation images make difference user scenario
  22. 22. Booting Process Normal bootingBoottloader Kernel Init init.rc, platform-specific rc init Kernel as RloaderBootloader Minimal device Restore init Init process Bootloader as RloaderBootloader Restore init process
  23. 23. Make ARM HibernatedMerge patches swsusp patch from TI/Nokia TOI patches according to your kernel versionswap out page as much as possibleARM does not support ACPICurrently, there are patches for ARMCortex A8/A9 provided
  24. 24. Hardware/Software DescriptonARM OMAP3 BeagleboardKernel 2.6.32 with corresponding TOI patchBootloader Qi256MB RAM0xdroid Eclair
  25. 25. Something before hibernatingecho 100 > /proc/sys/vm/swappinessecho -2 > /sys/power/tuxonice/image_size_limitecho 3 >/proc/sys/vm/drop_cachesbusybox swapon -p 1 /dev/block/mtdX
  26. 26. Normal Booting Time Diagram 25 seconds GPIO signal of Key-guard event GPIO signal ofPower On Reset stepping into kernel
  27. 27. Hibernation Boot Time Diagram 6 secondsPower On Reset GPIO signal of GPIO signal of stepping into kernel Key-gurad event
  28. 28. Rloader as Kernel or Bootloader?Its a trade-off between your boot time andmanagement costMaintainence Once kernel/TOI changes, you need to re-implementComplexicity How to restore pages? Resume point? PC value?Improved room might be limited
  29. 29. Further OptimizationRe-construct initcall stagesTry different algorithm out on compressingimages http://code.google.com/p/snappy/Lazy loadingPut driver state into hibernation image
  30. 30. SummaryIts still far away from being a productFile system inconstency Power failure as hibernationHardware solution is the sliver bullet?The time of stepping into hibernation is alsoneeded to concern
  31. 31. Demo
  32. 32. Resourcehttp://elinux.org/Boot_Timehttp://tuxonice.net/http://gitorious.org/improving-meego-boot-up-time/t2t/commit/d29d8576cf7www.kernel.org/doc/ols/2010/ols2010-pages-9-18.pdfhttp://gitorious.org/+0xlab/0xlab-bootloader/qi-bootloaderhttp://www.oberhumer.com/opensource/ucl/http://code.google.com/p/0xdroid/www.kernel.org/doc/ols/2010/ols2010-pages-9-18.pdf
  33. 33. Sponsoredby http://0xlab.org 27 May 2011

×