| From: |
| Anthony Awtrey <tony@idealcorp.com> |
| To: |
| Linux-hotplug-devel@lists.sourceforge.net |
| Subject: |
| [ANNOUNCE] Hotplug-Perl |
| Date: |
| Tue, 10 May 2005 21:25:39 -0400 |
| Archive-link: |
| Article,
Thread
|
[SHORT VERSION]
Version 1.0 of hotplug-perl is now available at:
http://opensource.idealcorp.com/hotplug-perl/
It is a boot speed performance oriented implementation of hotplug
written in Perl. It requires a 2.6 kernel with hotplug and Perl 5.8. It
was developed with Debian Sarge as the target, but should work
elsewhere. The web page includes bootcharts demonstrating the
performance improvement over the bash implementation of hotplug.
[LONG VERSION]
Hello all,
We are developing a Debian-based tablet PC and are working on boot time
reductions. I played around with bootchart to figure out why our target
load based on Sarge was taking 1 minute 33 seconds to boot. It looked
like around 50 seconds was hotplug, so I started trying to figure out
what hotplug did and how to optimize the code.
Nothing I tried improved things very much, so I took a look at some of
the other hotplug projects out there. I think Greg KH's C implementation
is probably the right way to go long term, so I hacked together a perl
version of hotplug that we are going to use as a bridge until hotplug-ng
is ready for prime time.
The hotplug bash script iterates through the modules.*map files a line
at a time for each device it finds in the system. On our target system
it takes about 10 seconds just to get a list of the PCI modules. This
hotplug-perl implementation can list all the require modules for *all*
the subsystems in 4 tenths of a second; after that its all modprobe. We
reduced the boot time of our target system by 50 seconds by only
changing to hotplug-perl. We can now go from init to X in 43 seconds.
Now I get to play with X startup optimizations... :)
The following subsystems are supported right now:
o IDE o PCI
o IEEE1394 o SCSI
o INPUT o USB
o ISAPNP
All the subsystems are evaluated during the system startup, but I don't
have enough hardware to test all the subsystems as hotplug events. Right
now only USB, SCSI, INPUT and IEEE1394 events have been implemented and
tested. The /etc/hotplug.d/[subsystem]/*.hotplug scripts are also run
before modprobe if they exist and are executable.
I've tried to include all the little bits of the hotplug logic, like
delays in the scsi module until the /sys/.../media comes up, but some of
the code in that shell script is a little.. ah.. cryptic. I did not
bother trying to include support for 2.2 or 2.4 kernel, because I have
no way to test them.
Take a look if you are interested and let me know what you think. It
should be pretty easy to modify since everything is broken out into Perl
modules (Hotplug, Hotplug::PCI, Hotplug::USB, etc) and most of the
functions and tricky bits are commented. I look forward to your feedback!
Tony
--
Anthony L. Awtrey
Chief Technology Officer
[T] 407.999.9870 x13
[F] 407.999.9850
I.D.E.A.L. Technology Corporation
http://www.idealcorp.com
"The Leader in Linux and Open Source Solutions"
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op...