linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/3] Btrfs: apply the Probabilistic Skiplist on btrfs
@ 2012-01-10  7:31 Liu Bo
  2012-01-10  7:31 ` [RFC PATCH v2 1/3] Btrfs: add the Probabilistic Skiplist Liu Bo
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Liu Bo @ 2012-01-10  7:31 UTC (permalink / raw)
  To: linux-btrfs; +Cc: chris.mason, josef, dave

Since we are inclined to apply a lockless scheme on some objects of btrfs for
higher performance, we want to build a RCU version the Probabilistic Skiplist.

Here our skiplist algorithm is based on the skiplist experiments of
Con Kolivas <kernel@kolivas.org> for BFS cpu scheduler.
And more details about skiplist design are in patch 1.

Right now we have a plan to apply skiplist on extent_map and extent_state.

Here we choose extent_map firstly, since it is a "read mostly" thing,
and the change is quite direct, all we need to do is
a) to replace rbtree with skiplist,
b) to add rcu support.
And more details are in patch 2 and patch 3.

I've done some simple tests for performance on my 2-core box, there is no
obvious difference, but I want to focus on the design side and make sure
there is no more bug in it firstly.

For long term goals, we want to ship skiplist to lib, like lib/rbtree.c.

MORE TESTS ARE WELCOME!

---
changes v2:
- fix a bug reported by David Sterba <dave@jikos.cz>, thanks a lot!
- use mutex lock to protect extent_map updater side, so that we can make
  the reclaim code much easier.
  And I've ran through xfstests, no panic occurred but they failed at
  273 and 274, and I've tested them without my patches and
  found that they still fails on the upstream.
---

Liu Bo (3):
  Btrfs: add the Probabilistic Skiplist
  Btrfs: rebuild extent_map based on skiplist
  Btrfs: convert rwlock to RCU for extent_map

 fs/btrfs/Makefile      |    2 +-
 fs/btrfs/compression.c |    8 +-
 fs/btrfs/disk-io.c     |    9 +-
 fs/btrfs/extent_io.c   |   13 +--
 fs/btrfs/extent_map.c  |  278 +++++++++++++++++++++++++++++++-----------------
 fs/btrfs/extent_map.h  |   19 +++-
 fs/btrfs/file.c        |   11 +-
 fs/btrfs/inode.c       |   28 +++---
 fs/btrfs/ioctl.c       |    8 +-
 fs/btrfs/relocation.c  |    4 +-
 fs/btrfs/scrub.c       |    4 +-
 fs/btrfs/skiplist.c    |  101 +++++++++++++++++
 fs/btrfs/skiplist.h    |  217 +++++++++++++++++++++++++++++++++++++
 fs/btrfs/volumes.c     |   58 +++++-----
 14 files changed, 585 insertions(+), 175 deletions(-)
 create mode 100644 fs/btrfs/skiplist.c
 create mode 100644 fs/btrfs/skiplist.h


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

end of thread, other threads:[~2012-01-13  9:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10  7:31 [RFC PATCH v2 0/3] Btrfs: apply the Probabilistic Skiplist on btrfs Liu Bo
2012-01-10  7:31 ` [RFC PATCH v2 1/3] Btrfs: add the Probabilistic Skiplist Liu Bo
2012-01-11  0:37   ` David Sterba
2012-01-11  2:06     ` Liu Bo
2012-01-11 14:41       ` David Sterba
2012-01-11  1:36   ` David Sterba
2012-01-10  7:31 ` [RFC PATCH v2 2/3] Btrfs: rebuild extent_map based on skiplist Liu Bo
2012-01-10  7:31 ` [RFC PATCH v2 3/3] Btrfs: convert rwlock to RCU for extent_map Liu Bo
2012-01-12 21:28 ` [RFC PATCH v2 0/3] Btrfs: apply the Probabilistic Skiplist on btrfs Andi Kleen
2012-01-13  2:18   ` Liu Bo
2012-01-13  4:10     ` Dave Chinner
2012-01-13  9:01       ` Andi Kleen

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).