[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Clear Swap Cache
On Mon, Mar 06, 2000 at 05:31:20AM -0800, Alan Stanley wrote:
: Is it possible to manually clear the swap cache without having to resort to
: a reboot? Even long after the swap was needed, the cached swap remains when
: it is no longer needed. I would like to clear it every one and a while
: without having to reboot. Any ideas? I'm using a Raq3i.
Umm, you could re-write Linux's swap usage. Other than that, there is no
way reset the counters to say that swap is free. If swap is used, it is
marked that way by the kernel. Just because is has been marked as new does
not mean that it is currently being used. It may just be in a situation where
it is being used to cache something and won't be clear for a period of time (
if ever). It also may just be re-used if possible since Linux since Linux
tends to make use of "used, but unallocated" memory before ununsed memory.
I'm curious, why do you want the swap to be a zero?
To learn more about Linux's memory management, check out:
[shagster@dev mm]$ pwd
/usr/src/linux/mm
Or the following books:
Core Linux Kernel
Linux Kernel Internals
--
Mat Kovach mkovach@xxxxxxxxxxxxxxxxx
Cleveland Linux User Group http://cleveland.lug.net