From: Anand Jain <anand.jain@oracle.com> To: linux-btrfs@vger.kernel.org Cc: dsterba@suse.com, josef@toxicpanda.com Subject: [PATCH v4 0/3] btrfs: read_policy types latency, device and round-robin Date: Tue, 19 Jan 2021 23:52:04 -0800 [thread overview] Message-ID: <cover.1611114341.git.anand.jain@oracle.com> (raw) v4: Add rb from Josef in patch 1 and 3. In patch 1/3, use fs_info instead of device->fs_devices->fs_info. Drop round-robin policy because my workload (fio random) shows no performance gains due to fewer merges at the block layer. v3: The block layer commit 0d02129e76ed (block: merge struct block_device and struct hd_struct) has changed the first argument in the function part_stat_read_all() in 5.11-rc1. So trickle down its changes in the patch 1/4. v2: Fixes as per review comments, as in the individual patches. rfc->v1: Drop the tracing patch. Drop the factor associated with the inflight commands (because there were too many unnecessary switches). Few C styles fix. ----- This patchset adds read policy types latency, device, and round-robin, for the mirrored raid profiles such as raid1, raid1c3, raid1c4, and raid10. The default read policy remains as PID, as of now. Read policy types: Latency: Latency policy routes the read IO based on the historical average wait time experienced by the read IOs on the individual device. Device: With the device policy along with the read_preferred flag, you can set the device for reading manually. Useful to test mirrors in a deterministic way and helps advance system administrations. Round-robin (RFC patch): Alternates striped device in a round-robin loop for reading. To achieve this first we put the stripes in an array, sort it by devid and pick the next device. Test scripts: ============= I have included a few scripts which were useful for testing. -------------------8<-------------------------------- Set latency policy on the btrfs mounted at /mnt Usage example: $ readpolicyset /mnt latency Anand Jain (3): btrfs: add read_policy latency btrfs: introduce new device-state read_preferred btrfs: introduce new read_policy device fs/btrfs/sysfs.c | 57 ++++++++++++++++++++++++++++++++++++++++++- fs/btrfs/volumes.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/volumes.h | 5 ++++ 3 files changed, 121 insertions(+), 1 deletion(-) -- 2.28.0
WARNING: multiple messages have this Message-ID (diff)
From: Anand Jain <anand.jain@oracle.com> To: linux-btrfs@vger.kernel.org Cc: josef@toxicpanda.com, dsterba@suse.com Subject: [PATCH v4 0/3, full-cover-letter] btrfs: read_policy types latency, device and round-robin Date: Wed, 20 Jan 2021 20:34:37 +0800 [thread overview] Message-ID: <cover.1611114341.git.anand.jain@oracle.com> (raw) Message-ID: <20210120123437.OVx7ybGaVfmOdZxtpp43qcB_ORHQQs5OzPSzr3ZUGbo@z> (raw) In-Reply-To: <cover.1611114341.git.anand.jain@oracle.com> [Only some parts of the cover-letter went through, tying again.]. v4: Add rb from Josef in patch 1 and 3. In patch 1/3, use fs_info instead of device->fs_devices->fs_info. Drop round-robin policy because my workload (fio random) shows no performance gains due to fewer merges at the block layer. v3: The block layer commit 0d02129e76ed (block: merge struct block_device and struct hd_struct) has changed the first argument in the function part_stat_read_all() in 5.11-rc1. So trickle down its changes in the patch 1/4. v2: Fixes as per review comments, as in the individual patches. rfc->v1: Drop the tracing patch. Drop the factor associated with the inflight commands (because there were too many unnecessary switches). Few C styles fix. ----- This patchset adds read policy types latency, device, and round-robin, for the mirrored raid profiles such as raid1, raid1c3, raid1c4, and raid10. The default read policy remains as PID, as of now. Read policy types: Latency: Latency policy routes the read IO based on the historical average wait time experienced by the read IOs on the individual device. Device: With the device policy along with the read_preferred flag, you can set the device for reading manually. Useful to test mirrors in a deterministic way and helps advance system administrations. Round-robin (RFC patch): Alternates striped device in a round-robin loop for reading. To achieve this first we put the stripes in an array, sort it by devid and pick the next device. Test scripts: ============= I have included a few scripts which were useful for testing. -------------------8<-------------------------------- Set latency policy on the btrfs mounted at /mnt Usage example: $ readpolicyset /mnt latency Anand Jain (3): btrfs: add read_policy latency btrfs: introduce new device-state read_preferred btrfs: introduce new read_policy device fs/btrfs/sysfs.c | 57 ++++++++++++++++++++++++++++++++++++++++++- fs/btrfs/volumes.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/volumes.h | 5 ++++ 3 files changed, 121 insertions(+), 1 deletion(-) -- 2.28.0
next reply other threads:[~2021-01-20 7:54 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-20 7:52 Anand Jain [this message] 2021-01-20 12:34 ` [PATCH v4 0/3, full-cover-letter] btrfs: read_policy types latency, device and round-robin Anand Jain 2021-01-20 7:52 ` [PATCH v4 1/3] btrfs: add read_policy latency Anand Jain 2021-01-20 12:14 ` David Sterba 2021-01-21 10:10 ` Anand Jain 2021-01-21 17:52 ` David Sterba 2021-01-22 8:10 ` Anand Jain 2021-01-30 1:08 ` Anand Jain 2021-02-04 12:30 ` Anand Jain 2021-02-09 21:12 ` Michal Rostecki 2021-02-10 6:14 ` Anand Jain 2021-01-20 7:52 ` [PATCH v4 2/3] btrfs: introduce new device-state read_preferred Anand Jain 2021-01-21 10:19 ` Anand Jain 2021-01-20 7:52 ` [PATCH v4 3/3] btrfs: introduce new read_policy device Anand Jain 2021-01-20 12:34 ` [PATCH v4 0/3, full-cover-letter] btrfs: read_policy types latency, device and round-robin Anand Jain 2021-01-22 5:52 ` 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=cover.1611114341.git.anand.jain@oracle.com \ --to=anand.jain@oracle.com \ --cc=dsterba@suse.com \ --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: linkBe 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.