Keith Owens 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.
Dr. Horst H. von Brand replied:
> 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.
Actually, this is very undesirable, as we can currently ship and use the
filesystem modules without any kernel patch. It's not for reason of having
binary modules (open source, available at ftp.lustre.org), but rather to
avoid having to recompile the kernel in order to use the filesystem. The
VFS interface is very well defined, and we don't need any special hooks at
this time, so we don't want to add a line (where would it go anyways?) that
is simply "static kmem_cache_t *our_cache = NULL".
In any case, I think kmem_cache_destroy() will work (will see next time my
devel box is rebooted). However, most modules don't call this...
Cheers, Andreas
-- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert- 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