• Song Liu's avatar
    md/r5cache: improve journal device efficiency · 39b99586
    Song Liu authored
    It is important to be able to flush all stripes in raid5-cache.
    Therefore, we need reserve some space on the journal device for
    these flushes. If flush operation includes pending writes to the
    stripe, we need to reserve (conf->raid_disk + 1) pages per stripe
    for the flush out. This reduces the efficiency of journal space.
    If we exclude these pending writes from flush operation, we only
    need (conf->max_degraded + 1) pages per stripe.
    
    With this patch, when log space is critical (R5C_LOG_CRITICAL=1),
    pending writes will be excluded from stripe flush out. Therefore,
    we can reduce reserved space for flush out and thus improve journal
    device efficiency.
    Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    39b99586
raid5.c 233 KB