Subject: Re: swap into the void?
To: Christian Groessler <cpg@aladdin.de>
From: Chuck Silvers <chuq@chuq.com>
List: current-users
Date: 08/01/2002 19:39:26
"swapped out" doesn't mean what you think it does.  :-)

these days, "swapped out" just means that the pages for that process's
kernel stack are allowed to be written to swap and freed, not that this
has necessarily happened.  the reason why it isn't actually happening
is that the memory usage-balancing code sees that there's not enough
swap-backed memory in use to warrant reusing any of it yet, so the pages
stay in memory.

-Chuck


On Fri, Aug 02, 2002 at 01:30:15AM +0200, Christian Groessler wrote:
> Hi,
> 
> I'm currently doing a build of the 1.6 branch on my macppc machine,
> and I notice that "ps -aux" reports the original ./build.sh as being
> swapped out:
> 
> root  14166  0.0  0.4  544  1068 p1 SN+   1:08AM 0:00.11 /usr/local/tools/bin/nbmake install BUILD_tools n
> root  14165  0.0  0.0  612   376 p1 SWN+       - 0:00.00 /bin/sh -ec (cd /local/netbsdsrc-1.6/src && /usr/
> root  18795  0.0  0.0  556  1060 p1 SWN+       - 0:00.00 /usr/local/tools/bin/nbmake do-build 
> root  18794  0.0  0.0  612   376 p1 SWN+       - 0:00.00 /bin/sh -ec (cd /local/netbsdsrc-1.6/src && /usr/
> root   1071  0.0  0.0  492  1068 p1 SWN+       - 0:00.00 /usr/local/tools/bin/nbmake build 
> root    261  0.0  0.0  636   460 p1 SWN+       - 0:00.00 /bin/sh ./build.sh 
> root    248  0.0  0.0  764   916 p1 SWs        - 0:00.00 bash 
> root    247  0.0  0.4  412   948 ?? Ss   12:08AM 0:04.93 SCREEN (screen-3.9.10)
> 
> but at the same time "swapctl -lk" tells me
> 
> bash-2.05# swapctl -lk
> Device      1K-blocks     Used    Avail Capacity  Priority
> /dev/wd1b     1048576        0  1048576     0%    0
> 
> No swap space used!?
> 
> Where are the swapped out processes swapped to?
> 
> confused,
> chris