Re: [PATCH] automatic module_init ordering

From: Rusty Russell (
Date: Wed Aug 07 2002 - 06:10:59 EST

In message <Pine.LNX.4.44.0208071208210.28515-100000@serv> you write:
> Hi,
> On Wed, 7 Aug 2002, Rusty Russell wrote:
> > suspend/wakeup is a device issue, solved well by devicefs. This is
> > completely independent from the subtleties of initialization order in
> > the core kernel code: devices are not the problem.
> If you see the pci code as a bus device driver, it becomes a problem. I
> looked at the remaining initcalls in my kernel and most of them are for
> pci. I think pci is rather abusing the initcall system.
> I have that idea that pci (like other buses) could become a "normal"
> driver module (one will probably never compile it as a module, but one
> could at least manage it like one).
> So if we integrate the bus initalizations into the device initializations,
> there isn't much left of the current initcalls.

Yes, that's a very astute observation about PCI. But we will still
have the hard ones left, like the initcalls which want to be called
before SMP, or two-sided registration mechanisms (anything which has
registration of servers and clients) still requires ordering.

> > I really want *one* place where you can see what order things are
> > initalized. If that means one big file with #ifdef's, fine. But the
> > current approach of using link order, initializer levels and explicit
> > initializers is really hard to debug and modify.
> I agree that it's currently a mess, maybe your solution is the better in
> the short term to make the dependencies explicit, I'm not sure about that.
> My idea is to handle as much as possible over the module/driver
> initialization mechanisms and leave initcalls as special cases.

The best thing about the explicit initcalls is that they document
everything they are relying on, so they can be replaced. At the
moment it's very hard to see how to replace an initcall (does it rely
on link order for example).

I don't think we can complete the conversion before 2.6, so I think we
need both. If explicit core initcalls become v. rare, great!


  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:35 EST