[RFC] Loading of IDE modules by hw-detect - Debian

This is a discussion on [RFC] Loading of IDE modules by hw-detect - Debian ; I've felt for a while that disk-detect is unnecessarily loading all available IDE modules. This may have been needed for 2.4 and was even useful to avoid some issues with the early SATA drivers, but hardware detection in the kernel ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [RFC] Loading of IDE modules by hw-detect

  1. [RFC] Loading of IDE modules by hw-detect

    I've felt for a while that disk-detect is unnecessarily loading all
    available IDE modules. This may have been needed for 2.4 and was even
    useful to avoid some issues with the early SATA drivers, but hardware
    detection in the kernel has improved a lot since Sarge and Etch (ignoring
    for the moment the IDE->libata transition).

    We're also being inconsistent as we only do this for IDE drivers and not for
    SCSI and SATA drivers. And finally it's totally ineffective as by the time
    the module selection dialog is being displayed, the drivers that are needed
    to actually support the hardware *have already been loaded automatically*.

    Currently we load some 30 drivers by default, most of which remain unused as
    they are irrelevant for the system that's being installed.
    The attached (fairly simple) patch disables this and leaves things to the
    kernel/udev. It does support a boot parameter (hw-detect/load-ide=true) to
    force the old behavior.
    The patch still leaves the (semi-)manual detection for modules for devices
    on Sparc sbus, HPPA bus and some others.

    Patch has been tested for i386 (in VirtualBox) for both a netboot and
    CD-based install.

    Results are:
    - ~ 0.5MB memory saving
    - speed up of the installation (loading all the drivers takes time...)
    - less confusion for users who may wonder why seemingly random drivers are
    being selected
    - shorter and more specific lsmod output

    Some comments:
    - one reason to list modules explicitly was to allow setting parameters for
    them (especially ide-core); this is no longer really needed as module
    parameters can now also be passed at the boot prompt
    - we also loaded the isofs module by default; this is not needed as it will
    be loaded automatically if the '-t iso9660' option is used when mounting a
    CD (image), which we do in both cdrom-detect and iso-scan

    The patch may well introduce regressions, probably mainly in arches other
    than i386/amd64. But I feel that we should start moving towards a less
    manual detection (as is done for the installed system) and the best time to
    do so is early in the release cycle.
    We can easily add back targeted manual support where needed. I plan a call
    for testing if this change gets uploaded.

    Cheers,
    FJP


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHNhHzgm/Kwh6ICoQRAieyAJ4oFYjOVqKIIQ+BalHEXdAMyGhO1gCdH6WZ
    sKwKYe7O6/MhJ7B8/s3v9us=
    =29DX
    -----END PGP SIGNATURE-----


  2. Re: [RFC] Loading of IDE modules by hw-detect

    On Saturday 10 November 2007, Frans Pop wrote:
    > And finally it's totally ineffective as by the time the module selection
    > dialog is being displayed, the drivers that are needed to actually support
    > the hardware *have already been loaded automatically*.


    I wonder if we should not move to a different scheme to manually load device
    driver modules. We currently do offer that, but effectively only if _no_
    device of the type we're looking for is detected, which does not help users
    if e.g. one disk controller is detected, but another one isn't.

    Maybe the following would be an option.

    Instead of implementing module loading everywhere separately, create a new
    menu item _after_ finish-install which allows manual selection of modules
    to load (and maybe unload if not marked "[permanent]").
    This component could be invoked in cases where we cannot detect a device we
    need automatically (maybe passing a parameter for the type of device we
    want), but could also be selected manually from the main menu by (expert)
    users.
    This new component could of course still be part of hw-detect.

    This component could then also support entering module parameters, which we
    could then remove from the default installation flow where it is:
    - extremely seldom used at the moment
    - ineffective as it does not allow passing parameters for modules that are
    actually needed (as those have already been loaded automatically)
    - and thus basically only clutters expert mode installs
    - somewhat redundant as we also have the option of passing module parameters
    at the boot prompt

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHNhh4gm/Kwh6ICoQRAjBrAJ9pSfKl6Xr9I20g91t1HSS9Sh4HNQCg2Xtw
    FreIiz8dBzMJ131S2dc5rE0=
    =uw33
    -----END PGP SIGNATURE-----


  3. Re: [RFC] Loading of IDE modules by hw-detect

    On Saturday 10 November 2007, Frans Pop wrote:
    > I've felt for a while that disk-detect is unnecessarily loading all
    > available IDE modules. This may have been needed for 2.4 and was even
    > useful to avoid some issues with the early SATA drivers, but hardware
    > detection in the kernel has improved a lot since Sarge and Etch (ignoring
    > for the moment the IDE->libata transition).


    Changes in hw-detect and mountfloppy have now been committed. I'll upload
    tomorrow if there are no more comments.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHOCicgm/Kwh6ICoQRAiViAJ9S3QyTb3iyfFom0Z3B3qVjFShdtQCfWf2l
    juXLx9rKngTLce8o2A9xi+E=
    =OJmw
    -----END PGP SIGNATURE-----


+ Reply to Thread