Package: hotplug
Version: 0.0.20040329-21
Severity: wishlist

        Hi,

        A long time ago, I told Thomas net.ifup was wrong. I noticed
that I never made a complete writting on the subject, so here it is...

Problematic :
-----------
        Anatomy of the boot process (simplified)...
        1) Kernel boot
        2) Static net driver init, create net interfaces
        3) Userspace start
        4) init script manually load net drivers, create net interfaces
        5) Hotplug initialised
        6) Hotplug load net drivers, create net interfaces
        7) ifupdown initialise net system, creates /etc/hotplug/.run/net.enable
        8) Pcmcia initialised, load net drivers, create net interfaces
        9) User load net drivers, create net interfaces 

        The ifupdown subsystem forbid to call ifup before step
7. Therefore, all events occuring before 7 need to be delayed or
replayed after 7.

What's wrong with the current solution :
--------------------------------------
        The current solution fork a script, net.ifup, that busy wait
on /etc/hotplug/.run/net.enable, and run ifup when ready.

        A) The current solution only deal with events generated at
step 6, therefore is incomplete. Events generated at 2 are always
lost, events generated at 4 are usually lost.
        B) Forking a script adds overhead, this overhead occur in
every case, even if ifup is available. Most often, ifup is already up
and this overhead should not occur.
        C) A process is an expensive way to keep a simple state, each
waiting process consume memory during the boot process. Let's not even
talk of the busy wait.

Proposed solution :
-----------------
        The same solution that was adopted for PCI and USB should be
implemented for NET :
        o net.rc scan the list of available network interface and
generates all the event that were lost in 2, 4 and 6. Basically, it
generates an event for each interface found on the system.
        o net.agent drop/ignore events if called before net.agent,
otherwise calls directly ifup (no forking).

        It's pretty obvious that such solution would have a much lower
overhead. Also, being more similar to PCI and USB would help for
maintainance, and it could be pushed back upstream.

        The list of interfaces is available in /proc/net/dev, in
/sys/class/net/ or via "ifconfig -a".

        Regards,

        Jean


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to