Skip to content
  • Tomasz Majchrzak's avatar
    raid10: improve random reads performance · 0e5313e2
    Tomasz Majchrzak authored
    
    
    RAID10 random read performance is lower than expected due to excessive spinlock
    utilisation which is required mostly for rebuild/resync. Simplify allow_barrier
    as it's in IO path and encounters a lot of unnecessary congestion.
    
    As lower_barrier just takes a lock in order to decrement a counter, convert
    counter (nr_pending) into atomic variable and remove the spin lock. There is
    also a congestion for wake_up (it uses lock internally) so call it only when
    it's really needed. As wake_up is not called constantly anymore, ensure process
    waiting to raise a barrier is notified when there are no more waiting IOs.
    
    Signed-off-by: default avatarTomasz Majchrzak <tomasz.majchrzak@intel.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    0e5313e2