Re: OOPS with slab cache

From: Keith Owens (kaos@ocs.com.au)
Date: Tue Jan 11 2000 - 03:28:45 EST


On Mon, 10 Jan 2000 16:28:23 -0700 (MST),
Andreas Dilger <adilger@home.com> wrote:
>Hello all,
>Having looked into this slab cache/module problem some more (I read the
>comments that a slab cache should NOT be destroyed at all), it still
>leaves the problem of how to get at the existing cache after a module is
>unloaded and reloaded, if it doesn't keep any memory pointer in-kernel.
>Having "static cache_p" in the module is no good if the module itself
>is unloaded, and patching the kernel for this filesystem module just to
>hold a static pointer is not desirable.

Would a patch to add persistent variables for modules be accepted into
the kernel? Modules define variables like this

static __persistent cache * cache_p;

__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.

Easy enough to code but it is not worth doing unless the patch stands a
chance of being accepted into the kernel. So would this feature be
worthwhile?

-
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:17 EST