Re: why is modprobe (and nothing else) exec()'d?

2000-10-14 Thread Ingo Oeser

On Fri, Oct 13, 2000 at 10:01:56AM -0400, Chris Swiedler wrote:
> occasionally-used  code which could be replaced? Something like Rik's OOM
> killer comes to mind, except that obviously if you're out of memory you're
> not going to be able to load a new executable.

But you can load a module before, "MOD_INC_USE_COUNT;" it and
install a new oom_killer (or better: OOM-Handler) that suits your
needs.

You can even install one, which restores old behavior (just
panic()) to be backward-BUG-compatible ;-)

All you need, is to apply my patch[1]. It applies cleanly against
test10-pre1 an test10-pre2.

I'll soon provide an example module, which uses my OOM-killer API
so install a new OOM killer.

Regards

Ingo Oeser

[1] http://www.tu-chemnitz.de/~ioe/oom_kill_api.patch
-- 
Feel the power of the penguin - run [EMAIL PROTECTED]
:x
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



RE: why is modprobe (and nothing else) exec()'d?

2000-10-13 Thread Chris Swiedler

Ok, I should have thought of that ;-). I've never used modprobe directly
myself, and had forgotten that was possible. Thanks to everyone who replied.

chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: why is modprobe (and nothing else) exec()'d?

2000-10-13 Thread Harald Welte

On Fri, Oct 13, 2000 at 10:01:56AM -0400, Chris Swiedler wrote:
> Why is modprobe kept as a separate executable, when nothing else in the
> kernel is (seems to be)? What is the advantage to keeping modprobe separate,

modprobe is a userspace tool. It resolves dependencies based on a textfile
called modules.dep and asks the kernel to load the modules in the apropriate
order.

> chris

-- 
Live long and prosper
- Harald Welte / [EMAIL PROTECTED]http://www.gnumonks.org

GCS/E/IT d- s-: a-- C+++ UL$ P+++ L$ E--- W- N++ o? K- w--- O- M- 
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: why is modprobe (and nothing else) exec()'d?

2000-10-13 Thread Brian Gerst

Chris Swiedler wrote:
> 
> Why is modprobe kept as a separate executable, when nothing else in the
> kernel is (seems to be)? 

init?

> What is the advantage to keeping modprobe separate,
> instead of statically linked into the kernel? Are users able to replace
> modprobe with a better version? If so, why not do the same thing with other
> occasionally-used  code which could be replaced? Something like Rik's OOM
> killer comes to mind, except that obviously if you're out of memory you're
> not going to be able to load a new executable.

modprobe can be run at any time manually, which means it should remain
completely user space.

--

Brian Gerst
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: why is modprobe (and nothing else) exec()'d?

2000-10-13 Thread Keith Owens

On Fri, 13 Oct 2000 10:01:56 -0400, 
"Chris Swiedler" <[EMAIL PROTECTED]> wrote:
>Why is modprobe kept as a separate executable, when nothing else in the
>kernel is (seems to be)?

modprobe is a user space tool, it can be used by hand at any time.  It
shares a lot of code with insmod and depmod, another pair of user space
tools.  It is not the only one, exec_usermodehelper() is a general routine
and is used by baycom_epp as well (for /usr/sbin/eppfpga).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/