lkml.org 
[lkml]   [2000]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Some questions about linux kernel.
Date
From
Adam <adam@eax.com> said:
> > > Well why not to reserve memory for root usage only, as this is done with
> > > space on the root file system ?

> > That means no overcommitment of memory. It's a solution, but you'll need
> > _huge_ swapspaces just for making sure each time emacs spawns an ls the
> > space for the 4 500Kb files it has open is available.

> uh, when you are out of memory, you don't start emacs to fix the problem.
> you use sash (which seems be around 500kb and has most command build in
> including kill)

Yes, but the 500Kb _must_ be there for grabs, always; independent of
whatever strange stuff the system is doing ATM. So the 2+Gb for emacs have
to be available, or you can't even do a dired (which forks an ls, there is
no way the OS can know what the new child will do with its (totally
legitimate!) memory area. Remember Linux uses COW on fork(2)). Or you start
sash in a way that is never, ever requests extra memory when booting, and
use that to fix thigs up.

Both are solutions, both might be appropiate under certain circumstances.
No use for me, though.

[...]

> Right, it won't save you from runaway root process, but it will save you
> from runaway user program. Just like with disk space.

A runaway user program will squeeze the legitimate root processes into your
reserved area, and you loose anyway.

> And on interesting note, had we cast current memory situation on disk
> space it would be something like this. "Ops, we just ran out of disk
> space, let's kernel delete some files so that we can continue. How about
> /sbin/init." How many people would find that acceptable?

Disk space management _is_ different, you don't create a new file by
copying an existing (possibly huge) file and overwrite it with a much
smaller one all the time. Also, disk space is used in rather permanent
fashion, memory use is ephemeral.

> I don't mind have reseverd %5 of ram so that I can su and kill whatever
> offending process is. In fact I often run in one of windows 'sash' just
> for cases like this one. I also often have serial console with root on
> it already which comes hand too.

How does the kernel know that the new process is The Master Himself,
showing up to fix things up, and not yet aother ftpd forked off, or Joe
Random Luser trying to log in?

> All I need is kernel to suspend the programs which needs memory
> until *I* can figure out what's wrong and kill what *I* think is offending
> process.

Suspend sshd, init and X then. Exactly as useful as killing them, just that
you don't gain any memory that way.
--
Horst von Brand vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile +56 32 672616


-
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:57    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site