• Guoqing Jiang's avatar
    md/raid1: use bucket based mechanism for IO serialization · 025471f9
    Guoqing Jiang authored
    Since raid1 had already used bucket based mechanism to reduce
    the conflict between write IO and resync IO, it is possible to
    speed up performance for io serialization with refer to the
    same mechanism.
    
    To align with the barrier bucket mechanism, we created arrays
    (with the same number of BARRIER_BUCKETS_NR) for spinlock, rb
    tree and waitqueue. Then we can reduce lock competition with
    multiple spinlocks, boost search performance with multiple rb
    trees and also reduce thundering herd problem with multiple
    waitqueues.
    Signed-off-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
    Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
    025471f9
md.c 256 KB