Bug 3435

Summary: Investigate fast boot optimization options for non-SystemD init system.
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Saul Wold <sgw>
Component: coreAssignee: Radu Moisan <radu.moisan>
Status: RESOLVED NOTABUG QA Contact:
Severity: enhancement    
Priority: Low CC: jessica.zhang, meta.mr.watcher, meta.watcher, Qi.Chen, richard.purdie, sgw
Version: 1.4   
Target Milestone: 1.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Saul Wold 2012-11-14 21:15:50 UTC
Continue to look into optimizations for sysvinit startup and fastboot options.saul.wold@intel.com
Comment 1 Chen Qi 2012-12-15 20:16:40 UTC
Code for our sysvinit system is quite old. My desktop, Linux Mint, uses sysvinit on boot, together with upstart. 
I examined those init scripts, they are similar to the ones in our project, but they are newer and more reasonable. 
Besides, they support concurrency. And they regard the kernel command line parameters, including fastboot.
Some codes of sysvinit and initscripts in our project are easy to update to the newer version. And some ideas in nthe ewer version of initscripts are great. 

For now, there's only one script that is related to fastboot -- checkroot.sh. And it actually has not effect no matter /fastboot is represented in system or fastboot is specified in kernel command line. 

There are indeed a few problems in our sysvinit system and there are codes that could be improved, and should be.

I was thinking fixing/improving them along the way I add read-only rootfs support to our system. But maybe it's better that I open bugs for them? What you say, Saul?
Comment 2 Radu Moisan 2013-01-30 09:14:18 UTC
If you open bugs for them I could target them more specifically. We can use this as an umbrella bug to track all of those. Otherwise, for me it's quite generic and I would spend time investigating each piece in search for an optimization. Sharing your ideas would greatly reduce that time, and I would gladly help.
Comment 3 Chen Qi 2013-01-30 09:35:46 UTC
(In reply to comment #2)
> If you open bugs for them I could target them more specifically. We can use
> this as an umbrella bug to track all of those. Otherwise, for me it's quite
> generic and I would spend time investigating each piece in search for an
> optimization. Sharing your ideas would greatly reduce that time, and I would
> gladly help.

A major obstacle is the parallel execution problem.
Currently, the sysvinit scripts are run one by one at system startup. 
Some scripts don't have interdependencies and they can run in parallel.

I thought about using insserv to enable parallel execution of init scripts but haven't got time to dig into it.

chenqi@pek-qchen1-d1:~/poky$ find meta* -name "*insserv*"
meta/recipes-devtools/insserv
meta/recipes-devtools/insserv/insserv_1.14.0.bb
meta/recipes-devtools/insserv/files/insserv.conf
meta/classes/insserv.bbclass

I'm not sure whether it's appropriate. Or maybe there are other better ways to do this?
Comment 4 Radu Moisan 2013-01-30 09:47:27 UTC
For now this is a Low priority task, but I'll bring it up in my next meeting with Richard/Saul/Ross and see what can we do about it. Anyway, for the time being I think systemd has more priority, but once we finish that we can engage into this one.
Comment 5 Richard Purdie 2013-04-25 15:29:27 UTC
As Radu mentions, please file bugs for specific items we can do to improve sysvinit. We've looked at and optimised the system with inserv in the past even if we don't do the parallel execution thing.