Re: __init & __exit

Horst von Brand (vonbrand@inf.utfsm.cl)
Tue, 10 Aug 1999 09:50:35 -0400


Petr Vandrovec <vandrove@vc.cvut.cz> said:

[...]

> (2) There are some large structures in kernel
> which are marked as __init/__initdata because
> of they are used only at device initialization.
> Because of some of them are `helper' functions
> used by modules too, could not we introduce
> concept of swappable kernel memory? Device
> initialization occurs in specific contexts
> (boottime or inside module initialization (or
> cleanup, eventually)) where we could allow
> swapping. Of course, probably not for 2.4, but
> just idea... For example PCI bus scan, logo
> drawing code (currently unavailable for modules),
> videomode databasesare such things. And
> for hotpluggable devices we then cannot
> release __init section in most cases (as
> device initialization lives in this section
> in most cases).

It's probably easier to get the module in two pieces: foo-init and
foo-proper. foo-init loads foo-proper (or is loaded by a dependency,
whatever), initializes it and goes away. Or use the kernel __init idea: Use
it, loose it.

-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

- 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/