>It should be cheap, yes, but it will require a fundamental change in the
>VM: currently, all swap cache is readonly. No exceptions. To keep the
>allocation persistent, even over write()s to otherwise unshared pages
>(and we need to do to sustain good performance), we need to allow dirty
>pages in the swap cache. The current PG_Dirty work impacts on this.
I am just rewriting swapped-in pages to their previous location on swap to
avoid swap fragmentation. No need to have dirty pages into the swap cache
to handle that. We just have the information cached in the
page-map->offset field. We only need to know when it make sense to know if
we should use it or not. To handle that I simply added a PG_swap_entry
bitflag set at swapin time and cleared after swapout to the old entry or
at free_page_and_swap_cache() time. The thing runs like a charm (the
swapin performances definitely improves a lot).
ftp://e-mind.com/pub/andrea/kernel/2.3.3_andrea9.bz2
Andrea Arcangeli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/