lkml.org 
[lkml]   [1999]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.098 / U:1.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site