dynamic swapspace

Enrico Weigelt (weigelt@nibiru.pauls.erfurt.thur.de)
Sat, 25 Sep 1999 21:24:47 +0000


hi all,

i want to write an dynamic swap manager (allocate swapspace when
needed).

my first try was to write a little deamon, which watches the memory
usage
(from /proc) and creates a new swapfile when memory gets low.

but this doesn't work very well, bacause there can be critical
situations :

* an application could request more memory than currently free - the
swap
deamon can't increase the swapspace as fast as necessary.

* the swap deamon could get trouble if the memory is really full and
fail
to work (or even crash)

so i thought about doing changes in the kernel.

* move the swap deamon to a kernel thread.
* let the memory allocation functions block processes which request more
memory than the free amount.
* add a process flag which tells the memory allocation functions by
bypass
the new mechanism - for critical processes like the swap deamon itself.

where should i start looking in the sources to do this ?

ew.

-------------------------------------------
lets go to another world ... oberon

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