FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 04-01-2008, 11:50 PM
Dennis Jacobfeuerborn
 
Default very common kernel modules slow down the boot process

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:

ata_generic
ata_piix

...

sr_mod
uhci_hcd


Does the boot time decrease depending on the number of modules you include
in the kernel? Maybe it's just one or a few modules that make up the bulk
of that time.


Also should configuring these bits as external modules really have this
much of an impact on the boot time?


Regards,
Dennis

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-01-2008, 11:55 PM
Andrew Farris
 
Default very common kernel modules slow down the boot process

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:



floppy


I was going to suggest you might want to leave that one out, since I wouldn't
think its that common anymore... then I checked, and this is loaded on my
machine which has no floppy.


--
Andrew Farris <lordmorgul@gmail.com> www.lordmorgul.net
gpg 0x8300BF29 fingerprint 071D FFE0 4CBC 13FC 7DEB 5BD5 5F89 8E1B 8300 BF29
revoked key 0xC99B1DF3 no longer used
No one now has, and no one will ever again get, the big picture. - Daniel Geer
---- ----

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-02-2008, 12:05 AM
Harald Hoyer
 
Default very common kernel modules slow down the boot process

Dennis Jacobfeuerborn wrote:

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:

ata_generic
ata_piix

...

sr_mod
uhci_hcd


Does the boot time decrease depending on the number of modules you
include in the kernel? Maybe it's just one or a few modules that make up
the bulk of that time.


to be tested. was just a rough guess of the most common modules, compiled and measured.



Also should configuring these bits as external modules really have this
much of an impact on the boot time?


yep. nash, udev, rc.sysinit.. all wait on module loading



Regards,
Dennis




--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-02-2008, 03:05 AM
Dennis Jacobfeuerborn
 
Default very common kernel modules slow down the boot process

Harald Hoyer wrote:

Dennis Jacobfeuerborn wrote:

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:

ata_generic
ata_piix

...

sr_mod
uhci_hcd


Does the boot time decrease depending on the number of modules you
include in the kernel? Maybe it's just one or a few modules that make
up the bulk of that time.


to be tested. was just a rough guess of the most common modules,
compiled and measured.



Also should configuring these bits as external modules really have
this much of an impact on the boot time?


yep. nash, udev, rc.sysinit.. all wait on module loading


But 10s or 25% of boot time just for loading the modules? That sounds quite
bad. Maybe instead of moving the modules into the kernel it would be better
to find out why exactly the loading takes so long and to look at possible
optimizations.


Regards,
Dennis

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-02-2008, 04:20 AM
Dave Jones
 
Default very common kernel modules slow down the boot process

On Wed, Apr 02, 2008 at 01:22:13AM +0200, 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:
>
> ata_generic

this should only be used as a last resort if no other storage modules
claim a device. Usually there's a chipset driver that's a better choice
instead, but we keep this around so that we continue to boot on hardware
thats released after the distro.

We could fudge around it by changing the initcall order to be later
than all the chipset drivers (if that hasn't been done already)

> ata_piix
> cdrom
> dm_mirror
> dm_mod
> dm_snapshot
> dm_zero
> ehci_hcd
> ext3
> floppy
> i2c_core
> jbd
> libata
> mbcache
> ohci_hcd
> parport
> parport_pc
> pata_acpi
> scsi_mod
> sd_mod
> sg
> snd
> snd_mixer_oss
> snd_page_alloc
> snd_pcm
> snd_pcm_oss
> snd_seq
> snd_seq_device
> snd_seq_dummy
> snd_seq_midi_event
> snd_seq_oss
> snd_timer
> soundcore
> sr_mod
> uhci_hcd

Someone already proposed we switch the usb hcd drivers to builtins
for F10. It's a bit late right now to be changing something like
that which could introduce regressions. In the past when we tried
this, there were initialisation ordering problems.
(again, maybe it's fixed now, but it's something to find out in f10,
and then perhaps an f9 backport)

The rest of the modules you list deserve some consideration too.
After the usb suggestion last week, I made a todo item for f10
to go through all our =m choices that could possibly be =y's,
and also the opposite. We have a ton of stuff built-in that
could probably be better off as modules.
(boot with initcall_debug, and you'll see we spend quite a few
seconds of bootup trying to initialise hardware that doesn't exist).

Dave

--
http://www.codemonkey.org.uk

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-02-2008, 04:23 AM
Dave Jones
 
Default very common kernel modules slow down the boot process

On Wed, Apr 02, 2008 at 05:05:09AM +0200, Dennis Jacobfeuerborn wrote:
> Harald Hoyer wrote:
> > Dennis Jacobfeuerborn wrote:
> >> 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:
> >>>
> >>> ata_generic
> >>> ata_piix
> >> ...
> >>> sr_mod
> >>> uhci_hcd
> >>
> >> Does the boot time decrease depending on the number of modules you
> >> include in the kernel? Maybe it's just one or a few modules that make
> >> up the bulk of that time.
> >
> > to be tested. was just a rough guess of the most common modules,
> > compiled and measured.
> >
> >>
> >> Also should configuring these bits as external modules really have
> >> this much of an impact on the boot time?
> >
> > yep. nash, udev, rc.sysinit.. all wait on module loading
>
> But 10s or 25% of boot time just for loading the modules? That sounds quite
> bad. Maybe instead of moving the modules into the kernel it would be better
> to find out why exactly the loading takes so long and to look at possible
> optimizations.

Almost certainly a lot of it will be spent in parsing /lib/modules/$ver/modules.dep
Will Cohen did some experiments by sorting that file so that all the modules that
he had loaded were at the top of the file. I forget the exact numbers, but
it made a noticable difference.

I suspect that if modules.dep was sorted and indexed, that lookups could be
made a lot faster than they are now.

Dave

--
http://www.codemonkey.org.uk

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-02-2008, 04:24 AM
Dave Jones
 
Default very common kernel modules slow down the boot process

On Tue, Apr 01, 2008 at 04:55:54PM -0700, Andrew Farris wrote:
> 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:
>
> > floppy
>
> I was going to suggest you might want to leave that one out, since I wouldn't
> think its that common anymore... then I checked, and this is loaded on my
> machine which has no floppy.

The code to detect if we have a floppy controller lives... in the floppy module.
It's not something that's trivially detectable like pci/usb devices.

Dave

--
http://www.codemonkey.org.uk

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-02-2008, 04:27 AM
Will Woods
 
Default very common kernel modules slow down the boot process

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@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-02-2008, 04:49 AM
Harald Hoyer
 
Default very common kernel modules slow down the boot process

Andrew Farris wrote:

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:



floppy


I was going to suggest you might want to leave that one out, since I
wouldn't think its that common anymore... then I checked, and this is
loaded on my machine which has no floppy.




# echo "blacklist floppy" >> /etc/modprobe.conf

or even

# echo "install floppy /bin/true" >> /etc/modprobe.conf


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-02-2008, 04:54 AM
Harald Hoyer
 
Default very common kernel modules slow down the boot process

Will Woods wrote:


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



udev (modprobe triggered from udev) only speeds up by 3s of those 10s ... so something else is going on.



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



well, the udev team once thought of integrating this inside of udev.

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

Thread Tools




All times are GMT. The time now is 09:42 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org