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

Riley Williams (rhw@bigfoot.com)
Fri, 6 Nov 1998 19:57:41 +0000 (GMT)


Hi Brian.

>>> Now set the no. of freepages to say, 1024 (4 Mb on Intel
>>> platforms) and run 'eat' again as normal user. Watch the amount
>>> of free memory. It should drop down to ~ 4Mb - not below! You're
>>> then able to login as root and do your stuff ... ;o)

>> What if during the change there was less free pages than 1024?
>> (Sorry, too lazy to check the code)

> Then your *users* are in trouble - as I wrote later in the mail ;o)
> There's no check to see if 'rootpages' contains some strange or
> high value. But 'rootpages' doesn't affect UID 0 operations. Root
> *can* eat all memory if (s)he likes ...

> OTOH, rootpages is meant to be set during initialization of the
> system (like after /proc is mounted) ...........

Just a thought, but how much memory does root need to do suchlike
cleanups? Let's see - load the login shell (probably already in
memory anyway, so 0k), run ps (may already be in memory) to find out
which processes are currently hogging memory, then kill (usually a
shell internal, so 0k) to get rid of a few of them...that should do...

OTOH, what happens if CRON or the like starts up a memory hog as root?
Surely those rootpages should be reserved for genuine logons,
otherwise the memory in question could easily be taken up by root
CRON jobs ???

Best wishes from Riley.

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