linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [RFC PATCH 0/3] Btrfs: add xxhash algorithm
Date: Wed,  7 May 2014 18:56:29 +0800	[thread overview]
Message-ID: <1399460193-1713-1-git-send-email-bo.li.liu@oracle.com> (raw)

"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


             reply	other threads:[~2014-05-07 10:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07 10:56 Liu Bo [this message]
2014-05-07 10:56 ` [PATCH 1/3] Crypto: add xxhash algorithm 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399460193-1713-1-git-send-email-bo.li.liu@oracle.com \
    --to=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).