Your SlideShare is downloading. ×
Rloader, alternative tech to achieve fast boot time for ARM Linux
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

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

3,262
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.

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
3,262
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
158
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Connect your device to application
  • 2. Rloader,Alternative technology toachieve fast boot timefor ARM LinuxMatt Hsu <matt@0xlab.org>
  • 3. Agenda Motivation Boot Time Measurement Reduction Approach Hibernation Based Technologies Rloader Demo Summary Q&A
  • 4. Movitation
  • 5. Why Boot Time?Define boot time, pleasePower savingUser experiencesAndroids boot time is especially painfulDevices Tablet In-vechile system TV Smart Phone Camera
  • 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. Embedd Linux Wiki
  • 8. Boot Time Measurement
  • 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. User SpaceBootchart http://www.bootchart.org/cat /proc/uptime2012.39 512.64grabserial http://elinux.org/Grabserial
  • 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. Reduction Approach
  • 13. Divide and ConquerBootloaderKernelUserland
  • 14. BootloaderMinimal bootloader Qi bootloader zboot, linux boot directlyEnable I-cacheCopy kernel into base + 0x2000000 offsetDMA-capable copyMulti-block read (MMC)
  • 15. KernelKernel parameter quietPreset LPJ Loop per jiffyDeferred initcall include/linux/init.h arch/arm/kernel/vmlinux.ldsCompressed kernel UCL XZ
  • 16. UserlandOptimize linker and loader time Specific linker optionParallelize rc scriptApplication specific optimizationHibernation based technologies
  • 17. Hibernate-Based TechnologiesSwsusp, aka software suspendSwsusp2 (TuxOnICE)
  • 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. 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. Rloader, (Resume Loader)
  • 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. 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. 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. Hardware/Software DescriptonARM OMAP3 BeagleboardKernel 2.6.32 with corresponding TOI patchBootloader Qi256MB RAM0xdroid Eclair
  • 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. Normal Booting Time Diagram 25 seconds GPIO signal of Key-guard event GPIO signal ofPower On Reset stepping into kernel
  • 27. Hibernation Boot Time Diagram 6 secondsPower On Reset GPIO signal of GPIO signal of stepping into kernel Key-gurad event
  • 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. Further OptimizationRe-construct initcall stagesTry different algorithm out on compressingimages http://code.google.com/p/snappy/Lazy loadingPut driver state into hibernation image
  • 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. Demo
  • 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. Sponsoredby http://0xlab.org 27 May 2011