Re: very common kernel modules slow down the boot process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Apr 1, 2008, at 7:22 PM, Harald Hoyer wrote:
Compiling these modules, which are loaded on nearly every PC, in the kernel cuts down my boot time from 42s to 32s on my computer:

It's pretty well known that modprobe is slow. Heck, you've reported bugs about this before:
https://bugzilla.redhat.com/show_bug.cgi?id=249270 - modprobe is slow

Will Cohen (here at Red Hat) did some profiling and found one of the major problems was that modprobe takes a long time to search /lib/ modules/`uname -r`/modules.deps:
http://sourceware.org/ml/systemtap/2007-q1/msg00140.html

IIRC one of the proposed solutions was to have 'modprobed' - a modprobe daemon which would read modules.deps at system startup and handle all subsequent modprobe requests from udev etc.

Mac OS X does a similar thing; see
http://www.osxbook.com/book/bonus/misc/optimizations/#TWO
and its man pages for kextd(8) and kextcache(8).

The way they do early boot (the parts in our kernel & initrd) is essentially the same as us. One interesting optimization is that they support booting from a 'kernelcache' - a big fat image that has the kernel with the modules needed to find the root device *already linked in*. Weird. Other than that, as far as I can tell, it's basically just a kernel+initrd with modules in it.

Once they're into the full system, they start up kextd, which loads kernel module metadata and handles all further requests for module loading.

We, on the other hand, re-read the entire module dependency list every time anything requests a module be loaded. Which happens a *lot* at system startup. Yuck.

So, yes. There's a fun summer project for someone: modprobed.

-w

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux