Actually, there's still what could be regarded as a bug and I don't know
how to fix it cos I don't understand what's going on...
In my original (last week) large post to the list whining about the
problem (this post was universally ignored, boohoo) I noted not only the
problem that I have now fixed, but another, which I took to be a bug at
the time but now believe to be deliberate kernel behaviour: after a
session of major swapping, the machine had NO major memory-using
programs running (nothing at all bar what's there at boot) but still had
this output from free:
total used free shared buffers
cached
Mem: 516400 168752 347648 1540 5240
157392
-/+ buffers/cache: 6120 510280
Swap: 522992 160368 362624
If I interpret this correctly, the cache (of roughly 160megs) and the
swap (of roughly the same) are closely linked. Is this something to do
with "swap-cache" ?? I don't know what swap-cache is.
However, this will harm my "free-memory" algorithm. In fact, in the
above case, the memory isn't REALLY used, and so it should be regarded
as available, but my algorithm will regard it as being used since the
swap IS used (it'll ignore the cache though). So in this case, a tiny
bit of swapping seems to cause the machine to dump all of the cache and
swap, but until then, large programs are unable to use that 160megs.
Suggestions ?
Neil
-
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/