Re: OOPS with slab cache

From: Jamie Lokier (lkd@tantalophile.demon.co.uk)
Date: Tue Jan 11 2000 - 18:15:46 EST


Horst von Brand wrote:
> > __persistent in a module stores the data in a separate ELF section,
> > when the code is builtin __persistent is a no-op. modutils and
> > kernel/modules allocate and initialize storage for __persistent the
> > first time the module is loaded. Unloading a module does not remove
> > the __persistent data, reloading the module will reuse but not
> > initialize the assigned storage.
>
> How large would that be? What about a piece of the module that just stays
> put in the kernel (no special section loaded, etc)? If you want this for a
> module, you'll probably want to initialize it at boot anyway.

Now that /is/ a nice idea. It shouldn't take much memory --
__persistant would probably be a small section that could be kmalloced.

/proc/ksyms would retain the address of the persistant data, just as it
already retains other exported module symbols. In this case it would
retain that one symbol even when the module is unloaded. That gives
insmod an address to work with.

-- Jamie

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



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:18 EST