Skip to content

Setting write hint in MD RAID

Mariusz Dabrowski linux-raid 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/25 patches 0 repliesNew
  2. v1 posting 1/25 patches 0 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5raid1: copy write hint from master bio to behind biodrivers/md/raid1.c+2 -00 replies
2/5raid5: copy write hint from origin bio to stripedrivers/md/raid5.c drivers/md/raid5.h+7 -00 replies
3/5raid5: sysfs attribute for write hint policydrivers/md/raid5.c drivers/md/raid5.h+67 -00 replies
4/5raid5: set write hint for paritydrivers/md/raid5.c drivers/md/raid5.h+61 -40 replies
5/5raid5: set write hint for PPLDocumentation/admin-guide/md.rst drivers/md/raid5-ppl.c drivers/md/raid5.c +1 more+39 -10 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchArtur PaszkiewiczPawel Baldysiak
1/5R-b R-b
2/5R-b R-b
3/5R-b R-b
4/5R-b R-b
5/5R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RESEND PATCH 0/5] Setting write hint in MD RAID

This patchset adds support for write hints in MD driver. This is a new feature for NVMe drives compliant to 1.3 specification and introduced to Linux in kernel 4.13. Write hint has to be copied from bio containing user data to bios sent to RAID members. Additionally, write hint can be set for internal data like parity and PPL in RAID 5.

Setting write hint for parity is done with simple classification algorithm which works for sequential IO workload. It tries to predict which parity request are going to be overwritten in a moment and sets write hint for them. This algorithm uses stripe cache to count updates of each parity chunk. Parity request will be predicted as "soon-overwritten" if nubmer of parity updates is smaller than number of data chunks in stripe.

For PPL there is no special algorithm. It is updated very frequently so we can set write hint for each PPL write.

We have performed our internal tests which prove that setting write hint for parity and PPL can significantly reduce write amplification.

Mariusz Dabrowski (5):
raid1: copy write hint from master bio to behind bio
raid5: copy write hint from origin bio to stripe
raid5: sysfs attribute for write hint policy
raid5: set write hint for parity
raid5: set write hint for PPL

 Documentation/admin-guide/md.rst |  16 +++++
 drivers/md/raid1.c               |   2 +
 drivers/md/raid5-ppl.c           |   4 ++
 drivers/md/raid5.c               | 147 +++++++++++++++++++++++++++++++++++++--
 drivers/md/raid5.h               |  10 +++
 5 files changed, 175 insertions(+), 4 deletions(-)
Signature · 1 line
2.16.1