Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fast boot and suspend/resume

Similar presentations


Presentation on theme: "Fast boot and suspend/resume"— Presentation transcript:

1 Fast boot and suspend/resume
Zhang Rui Beijing October 18th 2008

2 Agenda Fast boot Fast suspend/resume Current State of the Art
Splash Screens Budget & Resource Scheduling Kernel Early Userspace X.org Fast suspend/resume Driver optimization Device asynchronous resume More aggressive attempts

3 Current state boot to be completely done in 5 seconds

4 We hate splash screens By the time you see it.... we want to be done!
4 2017/3/25

5 Time budgets, Resource scheduling
boot to be completely done in 5 seconds Component Allocated time Kernel 1 second Early boot X GUI/Desktop 2 seconds

6 sReadAhead read used portions of files in "use order" as early as possible to prime the pagecache "idle" IO scheduler class

7 Kernel Budget: 1 second All system components built into the kernel image Modules are slow, synchronous, and not needed for core components No initrd All key drivers are in the kernel /dev is populated with the fixed device nodes initrd management just plain takes too long

8 Kernel Budget: 1 second Asynchronous initialization of non-essential components with a new, asynchronous initcall level Reference: git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-fastboot.git

9 Early boot / Init Budget: 1 second
sysvinit, not upstart: Asynchronous, not Parallel Udev Persistent /dev reduces overhead enormously

10 Early boot / Init Budget: 1 second
Asynchronous for non-critical path

11 X.org Budget: 1 second xorg-x11-drv-intel driver XKB
Program everything during probing ... then restore it to standard ... then program it again for final use Various "extra" delays trimmed (after fixing PCI posting bugs) XKB Calling CPP ??? <explicit language removed> Caching the result – Compute once, use forever

12

13 Fast suspend/resume Not as complex as fast boot Time budget
BIOS + kernel + X/application No critical disk I/O request Time budget Resume Kernel + X/application in 1 second

14 Driver optimization non-critical work can be deferred during device resume Serio offload resume to kseriod Fix driver poor/wrong behavior AHCI HBA reset speed up

15 Device asynchronous resume
Resume devices asynchronously Sync before resume X/applications ACPI SCSI USB X/app X/app SCSI ACPI USB

16 More aggressive attempts
Device deferred resume instead of asynchronous resume don’t sync before resuming X/applications Screen is back before all the devices are resumed works but may bring potential risks X/app SCSI ACPI USB

17 More aggressive attempts
Resume X with the highest priorities Resume drm driver first to light the screen Resume X process before the other kernel drivers Works but not for upstream yet

18 S3 resume time Moblin BIOS kernel X/app. Current state 1.65s 1.78s
Asynchronous resume 1.65s 1.19s 0.36s deferred resume 1.65s 0.25s 0.36s resume X first 1.65s 0.25s 0.20s

19 TODO push “deferred resume” mechanism upstream Fast suspend
Fast shutdown

20 Acknowledgements Arjan van de Ven Auke Kok Li, Shaohua Zhao Yakui

21


Download ppt "Fast boot and suspend/resume"

Similar presentations


Ads by Google