diff options
author | Eivind Sarto <eivindsarto@gmail.com> | 2014-06-09 17:06:19 -0700 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-06-10 11:02:01 +1000 |
commit | 053f5b6525ae32da397e6c47721961f800d2c924 (patch) | |
tree | 2846e90e25ae2b5f998bffd2d22119695d139f23 /drivers/md | |
parent | 2844dc32ea67044b345221067207ce67ffe8da76 (diff) |
raid5: speedup sync_request processing
The raid5 sync_request() processing calls handle_stripe() within the context of
the resync-thread. The resync-thread issues the first set of read requests
and this adds execution latency and slows down the scheduling of the next
sync_request().
The current rebuild/resync speed of raid5 is not much faster than what
rotational HDDs can sustain.
Testing the following patch on a 6-drive array, I can increase the rebuild
speed from 100 MB/s to 175 MB/s.
The sync_request() now just sets STRIPE_HANDLE and releases the stripe. This
creates some more parallelism between the resync-thread and raid5 kernel daemon.
Signed-off-by: Eivind Sarto <esarto@fusionio.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ce421e3a3980..28219fa66e73 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -5074,8 +5074,8 @@ static inline sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, still_degraded); set_bit(STRIPE_SYNC_REQUESTED, &sh->state); + set_bit(STRIPE_HANDLE, &sh->state); - handle_stripe(sh); release_stripe(sh); return STRIPE_SECTORS; |