On Tue, 26 Mar 2013 13:37:06 +0800 Shaohua Li <shli@xxxxxxxxxx> wrote: > I'm using a fast SSD to do swap. scan_swap_map() sometimes uses up to 20~30% > CPU time (when cluster is hard to find, the CPU time can be up to 80%), which > becomes a bottleneck. scan_swap_map() scans a byte array to search a 256 page > cluster, which is very slow. > > Here I introduced a simple algorithm to search cluster. I had a few comments on the patches. Problem is, I'm still stuck on http://ozlabs.org/~akpm/mmots/broken-out/swap-add-a-simple-detector-for-inappropriate-swapin-readahead-fix.patch. I quite dislike that patch - it has to have more magic handwavy constants per square inch than any patch I've ever seen before. I'd really prefer that we come up with something more robust, adaptive and generally thought-through than this. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>