The attached patch does what I described in the other thread, it makes the pageout code free swap space when swap is getting full, by taking away the swap space from pages that get moved onto or back onto the active list. In some tests on a system with 2GB RAM and 1GB swap, it kept the free swap at 500MB for a 2.3GB qsbench, while without the patch over 950MB of swap was in use all of the time. This should give kswapd more flexibility in what to swap out. What do you think? Signed-off-by: Rik van Riel -- Politics is the struggle between those who want to make their country the best in the world, and those who believe it already is. Each group calls the other unpatriotic.