linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arne Jansen <sensille@gmx.net>
To: chris.mason@oracle.com, linux-btrfs@vger.kernel.org
Subject: [PATCH v4 0/6] btrfs: generic readeahead interface
Date: Wed, 29 Jun 2011 22:10:03 +0200	[thread overview]
Message-ID: <cover.1309375866.git.sensille@gmx.net> (raw)

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
Change from v3:
 - rebased to current for-linus
 - in v3 patch 1 was missing

Arne Jansen (7):
  btrfs: add an extra wait mode to read_extent_buffer_pages
  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   |   84 ++++-
 fs/btrfs/disk-io.h   |    2 +
 fs/btrfs/extent_io.c |    8 +-
 fs/btrfs/extent_io.h |    4 +-
 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, 1274 insertions(+), 75 deletions(-)
 create mode 100644 fs/btrfs/reada.c

-- 
1.7.3.4


             reply	other threads:[~2011-06-29 20:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29 20:10 Arne Jansen [this message]
2011-06-29 20:10 ` [PATCH v4 1/7] btrfs: add an extra wait mode to read_extent_buffer_pages Arne Jansen
2011-06-29 20:50   ` Josef Bacik
2011-06-29 20:10 ` [PATCH v4 2/7] btrfs: add READAHEAD extent buffer flag Arne Jansen
2011-06-29 20:55   ` Josef Bacik
2011-06-29 20:10 ` [PATCH v4 3/7] btrfs: state information for readahead Arne Jansen
2011-06-29 20:58   ` Josef Bacik
2011-06-29 20:10 ` [PATCH v4 4/7] btrfs: initial readahead code and prototypes Arne Jansen
2011-06-29 21:49   ` Josef Bacik
2011-06-30  7:37     ` Arne Jansen
2011-06-30 12:49       ` Josef Bacik
2011-06-30 14:01         ` Arne Jansen
2011-06-29 20:10 ` [PATCH v4 5/7] btrfs: hooks for readahead Arne Jansen
2011-06-29 20:10 ` [PATCH v4 6/7] btrfs: test ioctl " Arne Jansen
2011-06-29 20:10 ` [PATCH v4 7/7] btrfs: use readahead API for scrub Arne Jansen

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=cover.1309375866.git.sensille@gmx.net \
    --to=sensille@gmx.net \
    --cc=chris.mason@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).