lkml.org 
[lkml]   [1998]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Module Ideas: Persistence, PnP, and more...
On Thu, Sep 03, 1998 at 11:34:46PM +0300, Alon Ziv wrote:
> Module settings will be accessed, just prior to module removal, by having
> rmmod inspect kernel memory for the relevant variables. It can be done by
> having rmmod load the object module, gather the list of variables to
> inspect, and access them via /dev/kmem.

As Alan mentioned, this is unthinkably bad. It is, however,
trivial to add another query_module(2) function to read a
parameter block.


> (BTW, this will mean that we need
> to remove the automatic reaping logic from the kernel, and move it to a
> userspace daemon; this isn't all that hard, and provides added benefits
> like per-module autoremoval timeout. And anything that moves code to
> userland is a win...)

Careful. One of the reasons the auto-reap stuff is in the kernel
is race conditions. Furthermore, it is linear for the kernel to
walk the list of modules, whereas it is quadratic for userspace
to do the same.

Perhaps the thing to do is to add a QM_ALL_INFO to grab the info
block for all modules at once, determine which are likely to be
remove this next round, store their persistence info, then call
delete_module(NULL) to perform the reap as it exists now.

> One caveat on this approach is that any state saved must be settable by
> insmod parameters; still, I think this is acceptable.

Quite.

> * All module parameters should use MODULE_PARM, preferrably together with
> MODULE_PARM_DESC. (Also, as mentioned above, common parameters should
> have conforming names).

The required use of MODULE_PARM is enforced in 2.1 already.

> * The MODULE_PARM type syntax should be extended, providing also an
> ability for specifying min/max values for integral types (maybe even a
> comma-separated list of allowed values) and `hints' as to input format
> (e.g., `MODULE_PARM(io,"i 0x378,0x388 : 0x%x")').

Why would you care about input format? But ranges and lists of values
aren't too odious.


-
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/faq.html

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