"xxHash is an extremely fast non-cryptographic Hash algorithm, working at speeds close to RAM limits."[1] And xxhash is 32-bits hash, same as crc32. Here is the hash comparsion extracted from the link[1]: (single thread, Windows Seven 32 bits, using Open Source's SMHasher on a Core 2 Duo @3GHz) -------------------------------------------- Name Speed Q.Score Author xxHash 5.4 GB/s 10 CRC32 0.43 GB/s 9 -------------------------------------------- This patch set adds xxhash into linux kernel and then modifies btrfs's checksum API a bit and adopts xxhash as an alternative checksum algorithm. At the very first stage of RFC, I only ran xfstests through to make sure it can work. A bunch of performance tests will be made in the future. Note: We need to update btrfs-progs side as well to set it up, I attach a hacky patch just for users to play with ;-) [1]: https://code.google.com/p/xxhash/ Liu Bo (3): Crypto: add xxhash algorithm Crypto: xxhash: add tests Btrfs: add another checksum algorithm xxhash crypto/Kconfig | 7 + crypto/Makefile | 1 + crypto/testmgr.c | 10 ++ crypto/testmgr.h | 33 ++++ crypto/xxhash.c | 383 ++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/Kconfig | 22 +++ fs/btrfs/compression.c | 6 +- fs/btrfs/ctree.h | 12 +- fs/btrfs/dir-item.c | 10 +- fs/btrfs/disk-io.c | 126 ++++++++------- fs/btrfs/disk-io.h | 2 - fs/btrfs/extent-tree.c | 43 +++-- fs/btrfs/file-item.c | 9 +- fs/btrfs/free-space-cache.c | 15 +- fs/btrfs/hash.c | 75 +++++++-- fs/btrfs/hash.h | 22 ++- fs/btrfs/inode-item.c | 6 +- fs/btrfs/inode.c | 16 +- fs/btrfs/props.c | 37 ++++- fs/btrfs/props.h | 3 +- fs/btrfs/scrub.c | 70 ++++++-- fs/btrfs/send.c | 7 +- fs/btrfs/super.c | 9 +- fs/btrfs/tree-log.c | 2 +- include/crypto/xxhash.h | 209 ++++++++++++++++++++++++ 25 files changed, 974 insertions(+), 161 deletions(-) create mode 100644 crypto/xxhash.c create mode 100644 include/crypto/xxhash.h -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html