All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.com
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v7 rebased 0/5] readmirror feature (sysfs and in-memory only approach; with new read_policy device)
Date: Thu, 30 Apr 2020 17:02:27 +0800	[thread overview]
Message-ID: <a963d6c8-f0ec-7d41-ff0a-26d3ef9d013d@oracle.com> (raw)
In-Reply-To: <1586173871-5559-1-git-send-email-anand.jain@oracle.com>


David,

  I am not sure if this will be integrated in 5.8 and worth the time to
  rebase. Kindly suggest.

-Anand

On 6/4/20 7:51 pm, Anand Jain wrote:
> v7:
> Fix switch's fall through warning. Changle logs updates where necessary.
> 
> v6:
> Patch 4/5 - If there is no change in device's read prefer then don't log
> Patch 4/5 - Add pid to the logs
> Patch 5/5 - If there isn't read preferred device in the chunk don't reset
> read policy to default, instead just use stripe 0. As this is in
> the read path it avoids going through the device list to find
> read preferred device. So inline to this drop to check if there
> is read preferred device before setting read policy to device.
> 
> __ Original email: __
> 
> v5:
> Worked on review comments as received in its previous version.
> Please refer to individual patches for the specific changes.
> Introduces the new read_policy 'device'.
> 
> v4:
> Rename readmirror attribute to read_policy. Drop separate kobj for
> readmirror instead create read_policy attribute in fsid kobj.
> merge v2:2/3 and v2:3/3 into v4:2/2. Patch titles have changed.
>   
> v3:
> v2:
> Mainly fixes the fs_devices::readmirror declaration type from atomic_t
> to u8. (Thanks Josef).
> 
> v1:
> As of now we use only %pid method to read stripped mirrored data. So
> application's process id determines the stripe id to be read. This type
> of 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 as because the overall disk
> bandwidth would remains under utilized.
> 
> One type of readmirror policy isn't good enough and other choices are
> routing the IO based on device's waitqueue or manual when we have a
> read-preferred device or a readmirror policy based on the target storage
> caching. So this patch-set introduces a framework where we could add more
> readmirror policies.
> 
> This policy is a filesystem wide policy as of now, and though the
> readmirror policy at the subvolume level is a novel approach as it
> provides maximum flexibility in the data center, but as of now its not
> practical to implement such a granularity as you can't really ensure
> reflinked extents will be read from the stripe of its desire and so
> there will be more limitations and it can be assessed separately.
> 
> The approach in this patch-set is sys interface with in-memory policy.
> And does not add any new readmirror type in this set, which can be add
> once we are ok with the framework. Also the default policy remains %pid.
> 
> Previous works:
> ----------------------------------------------------------------------
> There were few RFCs [1] before, mainly to figure out storage
> (or in memory only) for the readmirror policy and the interface needed.
> 
> [1]
> https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg86368.html
> 
> https://lore.kernel.org/linux-btrfs/20190826090438.7044-1-anand.jain@oracle.com/
> 
> https://lore.kernel.org/linux-btrfs/5fcf9c23-89b5-b167-1f80-a0f4ac107d0b@oracle.com/
> 
> https://patchwork.kernel.org/cover/10859213/
> 
> Mount -o:
> In the first trial it was attempted to use the mount -o option to carry
> the readmirror policy, this is good for debugging which can make sure
> even the mount thread metadata tree blocks are read from the disk desired.
> It was very effective in testing radi1/raid10 write-holes.
> 
> Extended attribute:
> As extended attribute is associated with the inode, to implement this
> there is bit of extended attribute abuse or else makes it mandatory to
> mount the rootid 5. Its messy unless readmirror policy is applied at the
> subvol level which is not possible as of now.
> 
> An item type:
> The proposed patch was to create an item to hold the readmirror policy,
> it makes sense when compared to the abusive extended attribute approach
> but introduces a new item and so no backward compatibility.
> -----------------------------------------------------------------------
> 
> Anand Jain (5):
>    btrfs: add btrfs_strmatch helper
>    btrfs: create read policy framework
>    btrfs: create read policy sysfs attribute, pid
>    btrfs: introduce new device-state read_preferred
>    btrfs: introduce new read_policy device
> 
>   fs/btrfs/sysfs.c   | 128 +++++++++++++++++++++++++++++++++++++++++++++
>   fs/btrfs/volumes.c |  39 +++++++++++++-
>   fs/btrfs/volumes.h |  16 ++++++
>   3 files changed, 182 insertions(+), 1 deletion(-)
> 

  parent reply	other threads:[~2020-04-30  1:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 11:51 [PATCH v7 rebased 0/5] readmirror feature (sysfs and in-memory only approach; with new read_policy device) Anand Jain
2020-04-06 11:51 ` [PATCH v7 1/5] btrfs: add btrfs_strmatch helper Anand Jain
2020-04-06 11:51 ` [PATCH v7 2/5] btrfs: create read policy framework Anand Jain
2020-04-06 11:51 ` [PATCH v7 3/5] btrfs: create read policy sysfs attribute, pid Anand Jain
2020-05-19 10:07   ` Johannes Thumshirn
2020-05-20  8:54     ` Anand Jain
2020-05-20  8:55       ` Johannes Thumshirn
2020-04-06 11:51 ` [PATCH v7 4/5] btrfs: introduce new device-state read_preferred Anand Jain
2020-04-06 11:51 ` [PATCH v7 5/5] btrfs: introduce new read_policy device Anand Jain
2020-04-30  9:02 ` Anand Jain [this message]
2020-05-15 19:58   ` [PATCH v7 rebased 0/5] readmirror feature (sysfs and in-memory only approach; with new read_policy device) David Sterba
2020-05-19 10:02     ` Anand Jain
2020-05-22 13:46       ` David Sterba
2020-05-26  7:23         ` Anand Jain
2020-06-01 15:07           ` David Sterba
2020-05-22 19:15       ` Steven Davies

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=a963d6c8-f0ec-7d41-ff0a-26d3ef9d013d@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=dsterba@suse.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 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.