Hi, I recently realised
affecting me - I have my desktop machine setup with an onboard BIOS
supported raid setup which ends up running with dm-raid1 targets.
Anyhow, doing a load-balancing heuristic seemed pretty approachable,
so I put one together; I looked at reusing the md raid1.c logic but
the two implementations are pretty far apart. I did borrow what seemed
to be the most significant heuristic - reading from the same target if
the prior read was adjacent to it.
I didn't do the markup-on-read-complete, because with ahci tagging and
delayed reads it was more complex than I wanted to reason about
Anyhow, I'm sure that this is improvable further, but it seems like an
unqualified improvement over the status quo: it load balances reads,
sequential IO is still plenty fast, and it makes it a little clearer
for folk wanting to hack on this whats going on.
I would love a review for correctness and concurrency safety, if
someone has the time.
my patch: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/361733/+attachment/2192144/+files/raid1-loadbalance.patch
kernel-team mailing list