Re: [rfc][patch] swap: virtual swap readahead

From: Rik van Riel
Date: Wed May 27 2009 - 13:33:02 EST


Johannes Weiner wrote:

This patch makes swap-in base its readaround window on the virtual
proximity of pages in the faulting VMA, as an indicator for pages
needed in the near future, while still taking physical locality of
swap slots into account.

This has the advantage of reading in big batches when the LRU order
matches the swap slot order while automatically throttling readahead
when the system is thrashing and swap slots are no longer nicely
grouped by LRU order.

This is a nice simple implementation of proper
swapin readahead. The performance results are
surprisingly good.

I suspect the performance oddity you see with
single-process qsbench might be due to qsbench
having a weird access pattern that just happens
to benefit from getting pages back into memory
in LRU order - not something that I expect to
be common, so not a concern.

Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Hugh Dickins <hugh.dickins@xxxxxxxxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxx>

Reviewed-by: Rik van Riel <riel@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/