linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] apply the Probabilistic Skiplist on btrfs
@ 2012-01-05  9:30 Liu Bo
  2012-01-05  9:30 ` [RFC PATCH 1/3] Btrfs: add the Probabilistic Skiplist Liu Bo
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Liu Bo @ 2012-01-05  9:30 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!

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     |   15 ++-
 fs/btrfs/extent_io.c   |   13 +-
 fs/btrfs/extent_map.c  |  296 ++++++++++++++++++++++++++++++------------------
 fs/btrfs/extent_map.h  |   21 +++-
 fs/btrfs/file.c        |   23 +++-
 fs/btrfs/inode.c       |   69 ++++++++----
 fs/btrfs/ioctl.c       |    8 +-
 fs/btrfs/relocation.c  |    9 +-
 fs/btrfs/scrub.c       |    4 +-
 fs/btrfs/skiplist.c    |   98 ++++++++++++++++
 fs/btrfs/skiplist.h    |  217 +++++++++++++++++++++++++++++++++++
 fs/btrfs/volumes.c     |   68 ++++++-----
 14 files changed, 651 insertions(+), 200 deletions(-)
 create mode 100644 fs/btrfs/skiplist.c
 create mode 100644 fs/btrfs/skiplist.h


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [RFC PATCH 0/3] apply the Probabilistic Skiplist on btrfs
@ 2012-01-05  9:48 Liu Bo
  0 siblings, 0 replies; 7+ messages in thread
From: Liu Bo @ 2012-01-05  9:48 UTC (permalink / raw)
  To: linux-btrfs; +Cc: chris.mason, josef

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!

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     |   15 ++-
 fs/btrfs/extent_io.c   |   13 +-
 fs/btrfs/extent_map.c  |  296 ++++++++++++++++++++++++++++++------------------
 fs/btrfs/extent_map.h  |   21 +++-
 fs/btrfs/file.c        |   23 +++-
 fs/btrfs/inode.c       |   69 ++++++++----
 fs/btrfs/ioctl.c       |    8 +-
 fs/btrfs/relocation.c  |    9 +-
 fs/btrfs/scrub.c       |    4 +-
 fs/btrfs/skiplist.c    |   98 ++++++++++++++++
 fs/btrfs/skiplist.h    |  217 +++++++++++++++++++++++++++++++++++
 fs/btrfs/volumes.c     |   68 ++++++-----
 14 files changed, 651 insertions(+), 200 deletions(-)
 create mode 100644 fs/btrfs/skiplist.c
 create mode 100644 fs/btrfs/skiplist.h


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

end of thread, other threads:[~2012-01-06 10:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-05  9:30 [RFC PATCH 0/3] apply the Probabilistic Skiplist on btrfs Liu Bo
2012-01-05  9:30 ` [RFC PATCH 1/3] Btrfs: add the Probabilistic Skiplist Liu Bo
2012-01-05  9:30 ` [RFC PATCH 2/3] Btrfs: rebuild extent_map based on skiplist Liu Bo
2012-01-05  9:30 ` [RFC PATCH 3/3] Btrfs: convert rwlock to RCU for extent_map Liu Bo
2012-01-05 23:51 ` [RFC PATCH 0/3] apply the Probabilistic Skiplist on btrfs David Sterba
2012-01-06 10:14   ` Liu Bo
  -- strict thread matches above, loose matches on Subject: below --
2012-01-05  9:48 Liu Bo

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