lkml.org 
[lkml]   [1999]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dynamic swapspace
Robbert Muller wrote:

> On Sat, 25 Sep 1999, Enrico Weigelt wrote:
>
> > i want to write an dynamic swap manager (allocate swapspace when
> > needed).
>
> mmm smells like windows to me ;-)

sounds like efficiency.


> > * let the memory allocation functions block processes which request more
> > memory than the free amount.
> oke swap let seee this situation
>
> swap deamon needs memory, but there is not enough memory so swap deamon
> get blokked. Next there will me no memory so other precesses get locked
> to. finaly all processes get bloked and no process responce anymore.

nope. swap daemon locks pages on init, doesn't get swapped out so doesn't
block. the swap daemon shouldn't grow in size in the first place. should
something happen that consumes all available memory, the OOM handler exists
to free memory. reboot not required.

> so a reboot is needed ( magic sysrq )
>
> > * add a process flag which tells the memory allocation functions by
> > bypass
> > the new mechanism - for critical processes like the swap deamon itself.
>
> but there is no memory so the swapdeamon crashes and the fuction will not
> work anymore

just because there is no more memory doesn't mean a program should crash. if
this is the way you write code, i recommend a moment of thought.

with just a minor bit of thought, memory paging control and disk ops can be
handled sweetly and succintly without problems. and there's a beautiful
-ENOMEM type of return when you really can't get any more memory.

-d

--
This is Linux Country. On a quiet night, you can hear Windows NT reboot!
Do you remember how to -think- ? Do you remember how to experiment? Linux
__ is an operating system that brings back the fun and adventure in computing.
\/ for linux-kernel: please read linux/Documentation/* before posting problems




-
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:54    [W:0.029 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site