All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Davies <btrfs-list@steev.me.uk>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 1/3] btrfs: add readmirror type framework
Date: Thu, 2 Jan 2020 19:32:44 +0000	[thread overview]
Message-ID: <4f4a1dab-fd9b-a5b6-2109-d82fc222d208@steev.me.uk> (raw)
In-Reply-To: <1577959968-19427-2-git-send-email-anand.jain@oracle.com>

On 02/01/2020 10:12, Anand Jain wrote:
> As of now we use %pid method to read stripped mirrored data. So
> application's process id determines the stripe id to be read. This type
> of read IO routing typically helps in a system with many small
> independent applications tying to read random data. On the other hand
> the %pid based read IO distribution policy is inefficient if there is a
> single application trying to read large data and the overall disk
> bandwidth remains under utilized.
> 
> So this patch introduces a framework where we could add more readmirror
> policies, such as routing the IO based on device's wait-queue or manual
> when we have a read-preferred device or a policy based on the target
> storage caching.

I think the idea is good but that it would be cleaner if the tunable was 
named read_policy rather than readmirror as it's more obvious that it 
contains a policy tunable.

Do you envisage allowing more than one policy to be active for a 
filesystem? If not, what about using the same structure as the CPU 
frequency and block IO schedulers with the format

#cat /sys/block/sda/queue/scheduler
noop [deadline] cfq

Such that btrfs would (eventually) have something like

#cat /sys/fs/btrfs/UUID/read_policy
by_pid [user_defined_device] by_shortest_queue

And the policy would be changed by echo'ing the new policy name to the 
read_policy kobject.

Steve

  parent reply	other threads:[~2020-01-02 19:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02 10:12 [PATCH v2 0/3] readmirror feature (sysfs and in-memory only approach) Anand Jain
2020-01-02 10:12 ` [PATCH v2 1/3] btrfs: add readmirror type framework Anand Jain
2020-01-02 16:24   ` Josef Bacik
2020-01-03  9:57     ` Anand Jain
2020-01-02 19:32   ` Steven Davies [this message]
2020-01-03 10:28     ` Anand Jain
2020-01-03 14:51       ` Steven Davies
2020-01-03 10:31   ` [PATCH v3 " Anand Jain
2020-01-02 10:12 ` [PATCH v2 2/3] btrfs: sysfs, add readmirror kobject Anand Jain
2020-01-02 10:12 ` [PATCH v2 3/3] btrfs: sysfs, create by_pid readmirror attribute Anand Jain

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=4f4a1dab-fd9b-a5b6-2109-d82fc222d208@steev.me.uk \
    --to=btrfs-list@steev.me.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.