Messages in this thread | | | Date | Wed, 4 Aug 1999 17:16:26 +0200 | From | Ralf Baechle <> | Subject | Re: More linker magic.. |
| |
On Tue, Aug 03, 1999 at 10:40:06AM +0200, Andi Kleen wrote:
> Great stuff. > > Would it make sense to add a "priority" argument to __initcall ? > This would allow to express simple dependencies between modules. Of course > this could be emulated by immediate functions that do the traditional manual > initialization. > > When I have a large independent subsystem which has lots of modules, > like the networking queue disciplines, all dependent on some other > subsystem(s) to be initialized first (networking, queueing manager): > this would require the old #ifdef mess again with the middle function > that enforces ordering. Using priorities would be much cleaner. > > Expressing the priority via file ordering in the Makefile would be > flaky IMHO, and probably cause for subtle bugs. > > A central include file that assigns init priorities to well known > subsystems would be better IMHO. > > The standard[1] linker cannot sort constructors, but system startup > is not performance critical, so it is reasonable to sort the init > table at runtime.
You could iterate through all the initializers to be run at boot time until all of them have either have returned success or you don't make progress anymore during one iteration in which case you have uninitializable modules.
In this model the initialization of the ISA networking drivers mentioned by Alan would be done by one software module which itself initializes all the other modules.
Ralf
- 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/
| |