Far clearer ;-)
With reverse mapping it works for any page count.
> The "move directly to swap cache" is nice in that it doesn't add any new
> pages. But it's nasty in that it steals pages from the file cache, so that
> it basically turns a potentially sharable cache into a private cache that
> nobody else will see.
But you got it right the first time: we're evicting the page because it's
inactive and we want the memory for something else. We don't need to give
that page more second chances, it already had its share of chances before
it got this far in the eviction process. If the file page gets reloaded
before the swap-out completes it just means we chose the victim poorly
in the first place, or we're unlucky. The latter is supposed to be the
exception, not the rule.
> See? You actually _do_ have choices on what to do.
Yes, in this case, the correct thing and the dumb thing.
-- 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/