Improvement of bootup time using Power Management - Project Update -

17
2005/Nov/25 JapanTechnicalJamboree5 1 Improvement of bootup time using Power Management - Project Update - Hiroki Kaminaga Sony Corporation [email protected] [translated by [email protected]]

description

Improvement of bootup time using Power Management - Project Update -. Hiroki Kaminaga Sony Corporation [email protected] [translated by [email protected] ]. Goal:. Want to shorten start up time of application. Processing until the application reaches to main() - PowerPoint PPT Presentation

Transcript of Improvement of bootup time using Power Management - Project Update -

Page 1: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 1

Improvement of bootup time using Power Management

- Project Update -Hiroki Kaminaga

Sony [email protected]

[translated by [email protected]]

Page 2: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 2

Goal:

• Processing until the application reaches to main()– Transfer of image– Dynamic linking– Global constructors

• IPC Processing among applications for the whole system running

HWinitialization

Mountingdriversinit

(Boot loader/ kernel)

1 [s] 1 [s] 2 [s] 5 [s]

Startup time of application

• Want to shorten start up time of application

Page 3: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 3

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

Page 4: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 4

Hibernation on Linux(Comparison):

architecture i386, ppc, x86_64, ia64 i386, ppc, x86_64

Discontiguous memory ○ ×

Compression × ○

Encryption × ○

Suspend-to-swapfile × ○

Suspend-to-file × ○Userland サポート × ○

swsusp Suspend2

Source: http://www.suspend2.net/features

Page 5: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 5

Current Status:• Ported Suspend2 onto ARM

– Posted on Suspend2 ML– To be incorporated in next release!

http://lists.suspend2.net/lurker/message/20051114.094040.11261d0e.en.html

Page 6: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 6

Environment:• Target board

– OMAP Starter Kit (OSK 5912)

• OS– Linux 2.6

• Boot loader– U-boot

• Image destination– Flash ROM

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

Page 7: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 7

Suspend2 Evaluation:• Linux 2.6.14 + Suspend2-2.2-rc9• Hibernate from ash login state• Used printk time of kernel to measure time

– Baseline is the timimg when linux starts up from uboot

– In make menuconfig• Kernel hacking --->

[ ] Show timing information on printks– http://tree.celinuxforum.org/CelfPubWiki/PrintkTimes

Page 8: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 8

Suspend2 Results:• Normal Start up

– 7.618 [sec]

• Suspend2 (lzf on)– 22.492 [sec]– 12.371 MB 7.450 MB (compression rate

39%)

• Suspend2 (lzf off)– 17.99 [sec]

Suspend2 process start at: 4.402 [sec]

Diff of startup time: 20%, 4.50 [sec]

Page 9: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 9

swsusp Evaluation:• Linux 2.6.11

• Used printk time of kernel to measure time– Clock starts when linux starts up from uboot– In make menuconfig

• Kernel hacking ---> [ ] Show timing information on printks

– http://tree.celinuxforum.org/CelfPubWiki/PrintkTimes

Page 10: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 10

swsusp Results:• Normal startup

– 7.676 [sec]

• swsusp (ash)– 9.52 [sec]– Image: 6.38 MB

• swsusp (mplayer)– 13.910 [sec]– Image: 10.24 MB

(swsusp process start at: 2.174 [sec])

Page 11: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 11

Swsusp/suspend2 Comparison:• Not a strict comparison as Linux versions are

not the same…– Swsusp/linux2.6.11: image is small, and startup is

fast– Suspend2/linux2.6.14: LZF compression of image

is effective, but tradeoff with startup time

• Suspend2-2.2 is not stable yet, as it is RC…

Page 12: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 12

Swsusp/suspend2 Comparison: (cont.)• Image size/processing time

– Suspend2: 925KB/sec– swsusp: 889KB/sec

Page 13: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 13

Swsusp3:• Author of swsusp, Pavel, has extended swsusp

with encryption, compression, UI etc.• The goal is to minimize the change to kernel

by most of processing done in the user land• http://lists.osdl.org/pipermail/linux-pm/2005-September/001312.html• http://lists.osdl.org/pipermail/linux-pm/2005-November/001535.html• http://lists.osdl.org/pipermail/linux-pm/2005-November/001562.html

Page 14: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 14

Swsusp3: (ML digests)• Want to integrate kernel part into around 2.6.16

(Pavel)• If integrated, RH/FC kernel would fork. Swsusp3

uses /dev/mem, but they restrict /dev/mem to prevent rootkit (Dave Jones)

…(hot discussion continues on swsusp3 vs security)• Encryption/compression in userland is more

intuitive (Rafael J. WysockiRafael J. Wysocki )

Page 15: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 15

Swsusp3: (ML digests (cont.))

• Those functions are already in suspend2. Duplicated effort (Dumitru Ciobarcianu )

• It is different to implement in kernel. Can’t believe Pavel? Nigel knows what he should do to work together. (Greg K-H)

• I can’t understand why they think userland is the right place. (Nigel)

Page 16: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 16

Swsusp3: (ML digests (cont.))• Userland swsusp changes only 150 lines or

so in kernel (Pavel)

• Present Nigel’s code won’t be mainlined. (Greg K-H)

• (Hot discussion continues)

Page 17: Improvement of bootup time using Power Management - Project Update -

2005/Nov/25 JapanTechnicalJamboree5 17

EOF