linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Steven Davies <btrfs-list@steev.me.uk>
Cc: josef@toxicpanda.com, dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v6 5/5] btrfs: introduce new read_policy device
Date: Thu, 20 Feb 2020 11:54:11 +0800	[thread overview]
Message-ID: <27060c4c-548c-242e-0443-b826de487b8c@oracle.com> (raw)
In-Reply-To: <ca5fe4b1232aadb3aa0d39b3b339dcbe@steev.me.uk>


>> Whenever there isn't any read preferred device(s) or if more than one
>> stripe is marked as read preferred device then this read policy shall
>> use the stripe 0 for reading.
> 
> Should we consider the situation where more than one device is preferred 
> (perhaps for a future patch) - e.g. devid1 is HDD, devid2 is SSD, devid3 
> is SSD and data is RAID1C3?

Once we have read policy type qdepth, we will use the read preferred 
device with the larger qdepth. This message is in the code comment. Oops 
I should have add it here also.

> Will there be a warning when this fallback to stripe 0 happens? Although 
> I imagine that would either always display on mount before 
> read_preferred is set or flood dmesg for every read.

In a 3 disks raid1, if there is only one disk marked as read preferred, 
and if the stripe 0 and 1 are on non-read-preferred disks, it will pick 
stripe 0 and warning is unnecessary.

In a 3 disks raid1, if there are 2 disks marked as read preferred, and 
the stripe 0 and 1 are on those two read preferred disks, we will be 
using the Qdepth to find the suitable read preferred device.

> Perhaps fallback to the %pid policy to give some form of balancing would 
> be a better default?
> 

Lets say read_policy is set to 'device' but there isn't any 
read_preferred device, then it make sense to fall back to default 
read_policy. But for every read to determine if there is any read 
preferred device outside of the striped chunk not a good idea.

Thanks, Anand

      reply	other threads:[~2020-02-20  3:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 11:29 [PATCH v6 0/5] readmirror feature (sysfs and in-memory only approach; with new read_policy device) Anand Jain
2020-02-19 11:29 ` [PATCH v6 1/5] btrfs: add btrfs_strmatch helper Anand Jain
2020-02-19 11:29 ` [PATCH v6 2/5] btrfs: create read policy framework Anand Jain
2020-02-19 11:29 ` [PATCH v6 3/5] btrfs: create read policy sysfs attribute, pid Anand Jain
2020-02-19 11:29 ` [PATCH v6 4/5] btrfs: introduce new device-state read_preferred Anand Jain
2020-02-19 11:29 ` [PATCH v6 5/5] btrfs: introduce new read_policy device Anand Jain
2020-02-19 12:18   ` Steven Davies
2020-02-20  3:54     ` Anand Jain [this message]

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=27060c4c-548c-242e-0443-b826de487b8c@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=btrfs-list@steev.me.uk \
    --cc=dsterba@suse.cz \
    --cc=josef@toxicpanda.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).