Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Fast boot and suspend/resume Zhang Rui Beijing October 18 th 2008."— Presentation transcript:

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

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

3 3 Current state boot to be completely done in 5 seconds

4 4 We hate splash screens By the time you see it.... we want to be done! Splash screens

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

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

7 7 Kernel Budget: 1 second All system components built into the kernel image All system components built into the kernel image –Modules are slow, synchronous, and not needed for core components No initrd 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 8 Kernel Budget: 1 second Asynchronous initialization of non- essential components with a new, asynchronous initcall level 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 Reference: git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6- fastboot.git

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

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

11 11 X.org Budget: 1 second xorg-x11-drv-intel driver xorg-x11-drv-intel driver –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 XKB –Calling CPP ??? –Calling CPP ??? –Caching the result – Compute once, use forever

12 12

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

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

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

16 16 More aggressive attempts Device deferred resume instead of asynchronous resume 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 17 More aggressive attempts Resume X with the highest priorities 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 18 S3 resume time Moblin BIOSkernelX/app. 1.65s0.25s0.20s1.65s0.25s0.36s1.65s1.19s0.36s1.65s1.78s0.37s Current state Asynchronous resume deferred resume resume X first

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

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

21 21


Download ppt "Fast boot and suspend/resume Zhang Rui Beijing October 18 th 2008."

Similar presentations


Ads by Google