From 34db0cd60f8a1f4ab73d118a8be3797c20388223 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 11 Oct 2011 16:50:01 +1100 Subject: 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 --- drivers/md/raid1.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/md/raid1.h') diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h index 5b16d09817df..c732b6cce935 100644 --- a/drivers/md/raid1.h +++ b/drivers/md/raid1.h @@ -46,6 +46,7 @@ struct r1conf { /* queue pending writes to be submitted on unplug */ struct bio_list pending_bio_list; + int pending_count; /* for use when syncing mirrors: * We don't allow both normal IO and resync/recovery IO at -- cgit v1.2.3