linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] btrfs: generic readeahead interface
@ 2011-06-29 16:32 Arne Jansen
  2011-06-29 16:32 ` [PATCH v3 1/6] btrfs: add READAHEAD extent buffer flag Arne Jansen
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Arne Jansen @ 2011-06-29 16:32 UTC (permalink / raw)
  To: chris.mason, linux-btrfs

This series introduces a generic readahead interface for btrfs trees.
The intention is to use it to speed up scrub in a first run, but balance
is another hot candidate. In general, every tree walk could be accompanied
by a readahead. Deletion of large files comes to mind, where the fetching
of the csums takes most of the time.
Also the initial build-ups of free-space-caches and inode-allocator-caches
could be sped up.

To make testing easier, a simple ioctl interface is added to trigger a read-
ahead from user mode. It also implements a tree walk in the traditional way.

A simple demonstration from my 7-disk test btrfs:
 - enumerating the extent tree (traditional): 351s
 - enumerating the extent tree (readahead): 41s
 - enumerating extents+csum tree (readahead): 49s

The implementation is also tested with this tool in various combinations of
parallel reads of the same and of different trees.

The main changes from v1 are:
 - Switch from extent_state flags to extent_buffer flags.
 - Fix a race when triggering the read.
 - Fix a bug where only parts of the requested range where actually prefetched.
   The hit only when requesting parts of a tree, so the above numbers doesn't
   change.
Change from v2:
 - use rcu instead of transaction to protect root->node

Arne Jansen (6):
  btrfs: add READAHEAD extent buffer flag
  btrfs: state information for readahead
  btrfs: initial readahead code and prototypes
  btrfs: hooks for readahead
  btrfs: test ioctl for readahead
  btrfs: use readahead API for scrub

 fs/btrfs/Makefile    |    3 +-
 fs/btrfs/ctree.h     |   13 +
 fs/btrfs/disk-io.c   |   80 ++++
 fs/btrfs/disk-io.h   |    2 +
 fs/btrfs/extent_io.c |    2 +-
 fs/btrfs/extent_io.h |    1 +
 fs/btrfs/ioctl.c     |   93 +++++-
 fs/btrfs/ioctl.h     |   16 +
 fs/btrfs/reada.c     |  994 ++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/scrub.c     |  116 +++----
 fs/btrfs/volumes.c   |    8 +
 fs/btrfs/volumes.h   |    8 +
 12 files changed, 1267 insertions(+), 69 deletions(-)
 create mode 100644 fs/btrfs/reada.c

-- 
1.7.3.4


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

end of thread, other threads:[~2011-06-29 18:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 16:32 [PATCH v3 0/6] btrfs: generic readeahead interface Arne Jansen
2011-06-29 16:32 ` [PATCH v3 1/6] btrfs: add READAHEAD extent buffer flag Arne Jansen
2011-06-29 18:13   ` Josef Bacik
2011-06-29 18:24     ` Arne Jansen
2011-06-29 18:48       ` Arne Jansen
2011-06-29 16:32 ` [PATCH v3 2/6] btrfs: state information for readahead Arne Jansen
2011-06-29 16:32 ` [PATCH v3 3/6] btrfs: initial readahead code and prototypes Arne Jansen
2011-06-29 16:32 ` [PATCH v3 4/6] btrfs: hooks for readahead Arne Jansen
2011-06-29 16:32 ` [PATCH v3 5/6] btrfs: test ioctl " Arne Jansen
2011-06-29 16:32 ` [PATCH v3 6/6] btrfs: use readahead API for scrub Arne Jansen

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