linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Btrfs: add xxhash algorithm
@ 2014-05-07 10:56 Liu Bo
  2014-05-07 10:56 ` [PATCH 1/3] Crypto: " Liu Bo
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Liu Bo @ 2014-05-07 10:56 UTC (permalink / raw)
  To: linux-btrfs

"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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-05-15 16:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 10:56 [RFC PATCH 0/3] Btrfs: add xxhash algorithm Liu Bo
2014-05-07 10:56 ` [PATCH 1/3] Crypto: " Liu Bo
2014-05-07 10:56 ` [PATCH 2/3] Crypto: xxhash: add tests Liu Bo
2014-05-07 10:56 ` [PATCH 3/3] Btrfs: add another checksum algorithm xxhash Liu Bo
2014-05-07 10:56 ` [PATCH] Btrfs-progs: add xxhash Liu Bo
2014-05-15 16:57   ` David Sterba
2014-05-07 11:08 ` [RFC PATCH 0/3] Btrfs: add xxhash algorithm Tomasz Torcz
2014-05-07 20:50   ` Darrick J. Wong
2014-05-07 20:58     ` Gregory Maxwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).