Re: [PATCH] Patch to Memory Subsystem ... (Needed?)

Brian Schau (bsc@fleggaard.dk)
Sun, 08 Nov 1998 14:43:47 +0100


Stefan Monnier wrote:
>
> >>>>> "Brian" == Brian Schau <bsc@fleggaard.dk> writes:
> > But 'rootpages' doesn't affect UID 0 operations. Root *can* eat all
> > memory if (s)he likes ...
>
> My problem with your approach is the following:
> How do you define `root' ?

UID 0.

> Let's say I get into a situation where freespace <= rootspace. That means that
> non-root processes will not be able to get any further pages (if they're lucky,
> they'll get malloc=NULL, else they'll just be killed). Fine.

That's what I want.

> But now comes a process owned by root. What do you do ? This process might be
> a getty+sh+ps+kill to clean things up as you hope, but it might also be
> sendmail responding to a new connection (or any other root-owned process).
> How do you tell one from the other ?

You can't. The processes you describe typically only "lives" (= eats
memory) for a short time. They usually doesn't run for an extensive
period of time (save sendmail and httpd) - typically just for the
duration of the connection.

But what happens if sendmail can't get the memory it needs? It
aborts? It doesn't (AFAIK) eat the available memory and then hang ...

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

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