LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-19-2010, 06:04 PM   #1
dbrazeau
Member
 
Registered: Aug 2009
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184

Rep: Reputation: 28
parallel boot processes/threads?


I'm trying to reduce the boot time of my system. There is one driver that takes up a large percentage of my boot time, so this is currently my main focus. The driver basically enables a chip and polls it until it is ready. This process takes several seconds, so I am looking for a way to have he kernel continue the boot process while this driver is waiting for the chip to become ready. I am no kernel expert so any suggestions are welcome.

My initial approach was to create a new kernel thread for this driver's init/probe process. The idea behind this is that it can be scheduled out when its polling the chip to see if it is ready. This (hopefully) would prevent the kernel from wait for driver to completely load before it continues to boot. I'm not sure if this is even possible(like I said I am not a kernel expert), as my initial attempt doesn't seem to work.
 
Old 02-20-2010, 10:36 AM   #2
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
Is this chip essential for the boot process? If not, you might put the driver into a kernel module and load it with insmod in a startup script. In this way you can easily put the chip initialization in the background.
 
Old 02-22-2010, 11:00 AM   #3
dbrazeau
Member
 
Registered: Aug 2009
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184

Original Poster
Rep: Reputation: 28
It is not "essential" for the boot process, but is a requirement for this driver to be initialize before the system is "ready". If I do postpone the drivers initialization to the startup script then this just cause it to take longer before the system is "ready". Ideally I would like to start the drivers initialization early in the boot process this way it is ready by the time everything else has booted.

I have ran across a kernel configuration option, CONFIG_PCI_MULTITHREAD_PROBE (http://elinux.org/Threaded_Device_Probing), but it doesn't seem to be supported any more. Is there any patches available for the 2.6.30 kernel that would provide similar functionality?

I know that the 2.6.30 kernel supports asynchronous function calls. Is there any why to make the PCI code used asynchronous function calls to probe and initialize PCI devices and drivers, i.e. through a patch?
 
Old 02-22-2010, 12:53 PM   #4
dbrazeau
Member
 
Registered: Aug 2009
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184

Original Poster
Rep: Reputation: 28
So I have tried loading the driver as a module at the beginning of the startup script, and made it run in the background (modprobe driver &). This shaves a couple seconds off my boot time, but inevitably the driver is still the long pole. By the way this is the LSI Fusion MPT SAS driver.

Is there anyway to load a driver in the background(in parallel) early in the boot process. If could get the PCI driver to create a new thread/process when it calls the devices probe function it seems like this would accomplish what I want. Any thoughts on this approach?

Last edited by dbrazeau; 02-22-2010 at 01:04 PM.
 
  


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
Return code for parallel running threads jitendriya.dash Programming 2 05-13-2009 12:12 AM
Cases where processes will be used and where threads will be used aravinda78 Linux - Software 1 11-28-2008 10:31 AM
When to use threads and processes sr_sanjeev Linux - General 1 04-29-2008 02:38 AM
parallel processing of threads in java nickraj Programming 16 10-05-2006 10:15 AM
Show processes, not threads Martin Strand Linux - Newbie 1 06-14-2005 08:46 AM

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

All times are GMT -5. The time now is 11:56 PM.

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