Re: Q: kswapd as a module?

Rik van Riel (H.H.vanRiel@fys.ruu.nl)
Mon, 15 Dec 1997 20:38:36 +0100 (MET)


On Sun, 14 Dec 1997, QingLong wrote:

>
> Hello All!
>
> Here i have a system which (i hope) will never need swapping and i am
> going not to make any swap there. So i have a question:
> is it possible to create Linux kernel with no swapping at all?
> E.g. modularize swapper and make it configurable at compile time?

No, Linux uses memory as disk buffers every time the system
needs to read something from disk. And kswapd is there to
free the memory if it hasn't been used...
Never freeing disk buffers and the like _will_ cause some
very severe problems :-) It's like a 100% memory leakage...

And the actual swapping code takes up just a few kilobytes.

Another problem: how are you going to load the swapout daemon
when you're out of memory? (when you aren't out of memory, there's
no reason to load it).

It might be doable, but personally I don't think it'll be worth
it. Of course, when you decide you need it for some very special
hardware (embedded linux) we'll give you any support you need
with coding it...

Rik.
+-----------------------------+------------------------------+
| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ). | H.H.vanRiel@fys.ruu.nl |
| ...submissions welcome... | http://www.fys.ruu.nl/~riel/ |
+-----------------------------+------------------------------+