• Shaohua Li's avatar
    md/raid5: prioritize stripes for writeback · 535ae4eb
    Shaohua Li authored
    In raid5-cache writeback mode, we have two types of stripes to handle.
    - stripes which aren't cached yet
    - stripes which are cached and flushing out to raid disks
    
    Upperlayer is more sensistive to latency of the first type of stripes
    generally. But we only one handle list for all these stripes, where the
    two types of stripes are mixed together. When reclaim flushes a lot of
    stripes, the first type of stripes could be noticeably delayed. On the
    other hand, if the log space is tight, we'd like to handle the second
    type of stripes faster and free log space.
    
    This patch destinguishes the two types stripes. They are added into
    different handle list. When we try to get a stripe to handl, we prefer
    the first type of stripes unless log space is tight.
    
    This should have no impact for !writeback case.
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    535ae4eb
raid5.h 29.2 KB