Re: Memory Rusting Effect [re: Linux hostile to poverty]

Chris Wedgwood (chris@cybernet.co.nz)
Tue, 21 Jul 1998 21:51:14 +1200


On Tue, Jul 21, 1998 at 11:17:29AM +0200, Daniel Pittman wrote:

> Hmmm. On my system, network protocols with no active sockets and unused
> filesystems are already "swapped out" - or, at least, they do not eat my
> memory as I compiled them as modules...

Modules are arguably a better way of doing this, but for some stuff, they
may be kernel data structures which could be swapped out.

I expect 2.3.x will be considerably more modular, especially the networking
code.

> I was actually a little suprised that the math emulation code was unable
> to me compiler as a module, for precisely memory use reasons. I would
> have figured that making it into a module would let someone build a
> nice, modular kernel, portable across whatever CPU setup you had,
> irrespective of the presence of a math co-processor.

I'm not sure how you would handle FPU code if the module couldn't be loaded.
I guess you could alwas kill the process with a SIGILL or something, doesn't
seem like a very nice solution.

> So, unless I have missed something *really* obvious here, the only real
> advantage of being able to swap kernel code would come if Linux either
> (a) swapped little bits of active code, such as a few pages of the IPX
> code while other parts were in use, or (b) follows the NT model and
> implements everything in kernel space, giving a 12MB kernel with 1.5MB
> swapped in (as this box has right now...)

I think the advantage is there are some pages which are presently
unswappable, that could be swapped as they are not vital to the kernels
timers, scheduler or processes than may be sleeping.

I wouldn't expect to gain much from this, but enough to perhaps make things
better on a 4MB machine where every page counts.

-cw

-
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.altern.org/andrebalsa/doc/lkml-faq.html