lkml.org 
[lkml]   [1998]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Patch to Memory Subsystem ... (Needed?)
Riley Williams wrote:
>
> 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...


Too many "propably's". If one of the "propably's" fail, you might end
up in trouble - or so experience tell me.
I ended up in trouble due to Linux being to kind to users
malloc/calloc/*alloc requests. A lot of 'unable to load ...', 'cannot
map libc.so. blah, blah, blah' and the like.

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

Absolutely correct. My sole intention is to keep my users from doing
"anything stupid" (Ok, broad term!) If root asks for trouble, (s)he
will get it!

I don't see how (and maybe why) to implement something which would ban
root from doing something "silly". Contribute that to my lack of
knowledge with respect to the memory subsystem. I might have some
ideas on how to implement a '5% Real Genuine Root-reserve', but I don't
know what options the memory sub-system offers me or how flexible the
mss is.

I'll leave it to others (more proficient) to implement. Hint, hint!


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

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