LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-21-2014, 05:50 AM   #1
embLinux
Member
 
Registered: Dec 2013
Distribution: Mint
Posts: 54

Rep: Reputation: Disabled
Can i force the kernel to boot it's initializations parallel ???


Hello,

I was wondering if i could mange to initialize drivers, services etc. (all these jobs what the kernel does during startup) in parallel instead of sequentially. I want to aggressively lower the boot time. I know some services depend on each other but to make an easy example: during probing the network devices, it shall take care of the audio too, instead of waiting 10 s until the network is ready.

I heard of systemd and InitNG but I'm sure there has to be other methods. Isn't there an option for the kernel itself to boot this way ?

Thanks and greets
 
Old 01-21-2014, 06:42 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
The kernel neither knows nor cares about them - that's why you have an init task to initialize all that.

There are some functions you can build into the kernel, but certainly not all.
 
1 members found this post helpful.
Old 01-21-2014, 06:56 AM   #3
embLinux
Member
 
Registered: Dec 2013
Distribution: Mint
Posts: 54

Original Poster
Rep: Reputation: Disabled
I heared, that the kernel is doing many jobs already in parallel, but i thought it was possible to still improve this on some specific needs of the application. So the biggest part seems to be the init system ? Are there alternatives to systemd and InitNG ?
 
Old 01-22-2014, 09:24 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
The init daemons usually execute a series of scripts in, say, /etc/init.d/, and it always executes them in alphabetical order.

You'll observe that the files (or symlinks) here include a number in their names: "Snn" for start scripts and "Knn" for kill scripts. This is done on purpose, specifically to allow you to re-order the scripts. ("Kill" scripts are executed in reverse alphabetical order.)

As far as I know, scripts are always executed one-by-one, for obvious reasons of simplicity. However, within a script, you might see things being executed in-parallel, say by using xargs with the -P maxprocs option. Which all makes sense ... "init" really doesn't know what each script actually does, so it executes whatever it finds, in an always predictable-sequence, and it allows each individual script to be the master of its own affairs. Scripts can potentially be written in any language or execute any program.

I would frankly advise you to "go ahead and wait 10 seconds," or to explicitly specify your network configuration (once Linux has figured out what it is by booting-up once), so that in the future it doesn't have to "probe" and "discover." Mucking around too much with this aspect of the system is likely to cause unpredictability = trouble, with no real payoff for your troubles.

Last edited by sundialsvcs; 01-22-2014 at 09:26 AM.
 
1 members found this post helpful.
Old 01-24-2014, 01:04 AM   #5
embLinux
Member
 
Registered: Dec 2013
Distribution: Mint
Posts: 54

Original Poster
Rep: Reputation: Disabled
thanks for the response, even I knew most of what you said, still i prefere these wide answers, because if I find something new it helps to have better search results.

To have a fast boot, many people recommend to put all the init-scripts into just one, and if you say that it's possible to make it parallel within a script it all makes sense.
 
Old 01-24-2014, 03:22 AM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by embLinux View Post
Are there alternatives to systemd and InitNG ?
If you are saying that you are already using systemd, then, according to my limited knowledge, it should be already be capable of doing the things that you seem to be asking for.

So, maybe the answer is to look further into systemd, and see what it can do for you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Nvidia and ARM: It's a parallel, parallel, parallel world LXer Syndicated Linux News 0 03-21-2013 06:10 PM
initializations of SDIO card fails - receives same response for all commands -HELP ME mahesh_val Linux - Hardware 0 10-08-2009 05:03 AM
Linux NULL pointer dereference due to incorrect proto_ops initializations win32sux Linux - Security 15 08-19-2009 04:55 AM
How to force kernel to ignore a HDD at boot? fuzzyash Linux - Software 4 07-05-2007 04:46 AM
Skipping initializations Buttercups Linux - Newbie 1 07-08-2002 03:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration