]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
md/raid5: prioritize stripes for writeback
authorShaohua Li <shli@fb.com>
Thu, 16 Feb 2017 03:37:32 +0000 (19:37 -0800)
committerShaohua Li <shli@fb.com>
Thu, 16 Mar 2017 23:55:51 +0000 (16:55 -0700)
commit535ae4eb1225f19e1d1848c65eafea8b7e9112f4
tree524bee9d4ff71545c0ce81ee4dbe5913ae9eed44
parent818da59f97d6764edb91fa9d1f63d333d54eb999
md/raid5: prioritize stripes for writeback

In raid5-cache writeback mode, we have two types of stripes to handle.
- stripes which aren't cached yet
- stripes which are cached and flushing out to raid disks

Upperlayer is more sensistive to latency of the first type of stripes
generally. But we only one handle list for all these stripes, where the
two types of stripes are mixed together. When reclaim flushes a lot of
stripes, the first type of stripes could be noticeably delayed. On the
other hand, if the log space is tight, we'd like to handle the second
type of stripes faster and free log space.

This patch destinguishes the two types stripes. They are added into
different handle list. When we try to get a stripe to handl, we prefer
the first type of stripes unless log space is tight.

This should have no impact for !writeback case.

Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid5.c
drivers/md/raid5.h