• G
    md/raid1: use bucket based mechanism for IO serialization · 025471f9
    Guoqing Jiang 提交于
    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: NGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
    Signed-off-by: NSong Liu <songliubraving@fb.com>
    025471f9
md.c 255.7 KB