Re: Running LILO causes big scan of /dev

Werner Almesberger (almesber@lrc.epfl.ch)
Mon, 19 Feb 1996 10:39:05 +0100 (MET)


> Why so many? There are only a few files needed for the configuration.

Mainly for three reasons:
- LILO has to map device numbers to device names and this either
requires a (possibly static) mapping table or a dynamic scan of /dev
- in order to know the BIOS codes for SCSI drives, LILO has to find
the last IDE drive. Again, since LILO doesn't make assumptions about
names in /dev, it has to do a full scan
- LILO didn't remember the results of previous scans, so each reference
to a file or drive started the whole search again

I've now added a cache that avoids most of those scans while still
retaining the ability to find devices in unusual configurations
(/dev/disk/sd* or such).

By the way, LILO also has to issue many ioctls just to obtain the mapping,
so avoiding those stats and readdirs only removes about 50-80% of the
system calls.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, DI-LRC,EPFL,CH   werner.almesberger@lrc.di.epfl.ch /
/_IN_R_133__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/