There is. 1) Unreferenced process space page gets unmapped, goes on to LRU
lists 2) page aged down to zero until it gets deactivated 3) page deactivated
and evicted soon after. If the page is referenced during (2) or (3) it will
be mapped back in, no IO because it's still in the swap cache (minor fault).
But this is lopsided and hard to balance. Also, unmapping/remapping is an
expensive way to check for short-term page activity.
> > It seems the balancing FreeBSD does (up aging +3, down
> > aging -1, inactive list in LRU order as extra stage) is
>
> One other observation, we should add anonymously allocated memory to the
> active-list as soon as they are allocated in do_nopage. At the moment a
> large part of memory is not aged at all until we start swapping things
> out.
This is useless without rmap because the page will just be aged down, not up.
With rmap, yes, that's what needs to be done.
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/