Re: Linux/ix86 booting process and BIOS

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Mon Feb 21 2000 - 11:23:12 EST


Strohm Thomas (FV/SLD) * wrote:
> The following steps happen when booting:
> (1) BIOS executes
> (2) LILO loads vmlinuz and gunzips it
> (3) the kernel does initializations (I start counting when entering
> start_kernel())
> (4) init executes /etc/rc <rl> (rl=2)
>
> On a PII/350 system with 128MB of memory and running 2.2.4 (SuSE 6.2,
> non-SCSI), the
> measured times are: (1) 8s, (2) 1s, (3) 4s, (4) app. 25s.

My Toshiba 4070CDT laptop does (1) in about 1s. There are no messages,
just a logo for that time so maybe even that isn't necessary.

> (3) I know my hardware! -> Customize kernel.
> most of the time is spent in ide_init() (3.3s). Kernel spends 1.7s to
> figure
> out that IDE1..5 are empty :-) -> probe_for_drive(unit=0) only.
> This improves the 4s to almost only 1s. Most of the time now is spent in
> a) calibrate_delay() (0.23s) -> could skip this because I know the clock
> rate
> b) probe_for_drive(IDE0,master) (0.64s) -> needed :-)

Yes I've noticed IDE initialisation is the big hit at kernel
initialisation time. Back in the old days I remember sbpcd, the
Soundblaster CD driver, was an even bigger hit.

> (4) Kill most of the daemons, merge rc scripts, kill ldconfig [:-(], avoid
> modules,
> put functionality into kernel. 25s->8s.

If you profile which blocks are read from disk by the init process, and
prime the kernel page/buffer cache with those blocks by loading copies
from an unfragmented flat file (or reordering the blocks on disk), I
think you'll see a big speedup. I didn't say it was easy :-)

enjoy,
-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:28 EST