summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-10-11 16:50:01 +1100
committerNeilBrown <neilb@suse.de>2011-10-11 16:50:01 +1100
commit34db0cd60f8a1f4ab73d118a8be3797c20388223 (patch)
tree45d1d629d6b9195d47d30980595686c9a3ee92f9 /drivers/md/raid10.h
parent84fc4b56db85cb9e05326424049973a2036c9940 (diff)
downloadop-kernel-dev-34db0cd60f8a1f4ab73d118a8be3797c20388223.zip
op-kernel-dev-34db0cd60f8a1f4ab73d118a8be3797c20388223.tar.gz
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>
Diffstat (limited to 'drivers/md/raid10.h')
-rw-r--r--drivers/md/raid10.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h
index 35489a5..7facfdf 100644
--- a/drivers/md/raid10.h
+++ b/drivers/md/raid10.h
@@ -42,7 +42,7 @@ struct r10conf {
struct list_head retry_list;
/* queue pending writes and submit them on unplug */
struct bio_list pending_bio_list;
-
+ int pending_count;
spinlock_t resync_lock;
int nr_pending;
OpenPOWER on IntegriCloud