Hi, Rik, the patch below tries to reclaim orphaned swap pages after swapped processes exit. I've only given it basic testing but I want to get feedback on it sooner rather than later --- we need to do _something_ about this problem! The patch works completely differently to the release-on-exit diffs: this one works in refill_inactive(), so has zero impact on the hot paths. It also works by looking for such orphaned pages in the swap cache, not by examining swap entries --- it is much cheaper to find a swap entry for a given page than to find the swap cache page for a given swap entry. The patch should be fairly non-intrusive --- all it does is to clear the age, referenced bit and dirty bit on pages which are swap cached and which have page count and swap count == 1. The normal reclaim path will then recycle these pages rapidly. We can also extend this to do the swap reclaim that we want. Currently the recycling only happens if the page count is one, but in theory we can also do this for pages with higher refcounts if we are low on swap --- as long as the swap ref is one on a swap cached page, we know that the swap cache is the only reference to the swap entry and no ptes can possibly point to that location on disk, so it's safe to reclaim the swap cache at that point. Cheers, Stephen