btrfs: read_policy types latency, device and round-robin
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 10 repliesIn review
- v34 patches 10 repliesSuperseded
- v24 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 4 patches | 11 replies | Superseded |
Changes in v4 from the cover letter
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.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs: add read_policy latencyfs/ fs/ fs/ | +42 | 8 replies | |
| 2/3 | btrfs: introduce new device-state read_preferredfs/ fs/ | +54 | 1 reply | |
| 3/3 | btrfs: introduce new read_policy devicefs/ fs/ fs/ | +26 | 0 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Josef Bacik |
|---|---|
| 1/3 | R-b |
| 2/3 | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/3] btrfs: read_policy types latency, device and round-robin
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(-)
Signature · 1 line
2.28.0