Skip to content
  • NeilBrown's avatar
    Allow raid10 resync to happening in larger chunks. · 0310fa21
    NeilBrown authored
    
    
    The raid10 resync/recovery code currently limits the amount of
    in-flight resync IO to 2Meg.  This was copied from raid1 where
    it seems quite adequate.  However for raid10, some layouts require
    a bit of seeking to perform a resync, and allowing a larger buffer
    size means that the seeking can be significantly reduced.
    
    There is probably no real need to limit the amount of in-flight
    IO at all.  Any shortage of memory will naturally reduce the
    amount of buffer space available down to a set minimum, and any
    concurrent normal IO will quickly cause resync IO to back off.
    
    The only problem would be that normal IO has to wait for all resync IO
    to finish, so a very large amount of resync IO could cause unpleasant
    latency when normal IO starts up.
    
    So: increase RESYNC_DEPTH to allow 32Meg of buffer (if memory is
    available) which seems to be a good amount.  Also reduce the amount
    of memory reserved as there is no need to keep 2Meg just for resync if
    memory is tight.
    
    Thanks to Keld for the suggestion.
    
    Cc: Keld Jørn Simonsen <keld@dkuug.dk>
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    0310fa21