]> git.baikalelectronics.ru Git - kernel.git/commit
md: add proper write-congestion reporting to RAID1 and RAID10.
authorNeilBrown <neilb@suse.de>
Tue, 11 Oct 2011 05:50:01 +0000 (16:50 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 11 Oct 2011 05:50:01 +0000 (16:50 +1100)
commit00f400a3420fcec1cb9a5c353a2589b83a9b704d
tree45d1d629d6b9195d47d30980595686c9a3ee92f9
parent10c55c0a4ea3144fc377eba88cfdac8827dd5c1e
md: add proper write-congestion reporting to RAID1 and RAID10.

RAID1 and RAID10 handle write requests by queuing them for handling by
a separate thread.  This is because when a write-intent-bitmap is
active we might need to update the bitmap first, so it is good to
queue a lot of writes, then do one big bitmap update for them all.

However writeback request devices to appear to be congested after a
while so it can make some guesstimate of throughput.  The infinite
queue defeats that (note that RAID5 has already has a finite queue so
it doesn't suffer from this problem).

So impose a limit on the number of pending write requests.  By default
it is 1024 which seems to be generally suitable.  Make it configurable
via module option just in case someone finds a regression.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c
drivers/md/raid1.h
drivers/md/raid10.c
drivers/md/raid10.h