• Chao Yu's avatar
    f2fs: support subsectional garbage collection · e3080b01
    Chao Yu authored
    Section is minimal garbage collection unit of f2fs, in zoned block
    device, or ancient block mapping flash device, in order to improve
    GC efficiency, we can align GC unit to lower device erase unit,
    normally, it consists of multiple of segments.
    
    Once background or foreground GC triggers, it brings a large number
    of IOs, which will impact user IO, and also occupy cpu/memory resource
    intensively.
    
    So, to reduce impact of GC on large size section, this patch supports
    subsectional GC, in one cycle of GC, it only migrate partial segment{s}
    in victim section. Currently, by default, we use sbi->segs_per_sec as
    migration granularity.
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    e3080b01
gc.c 32.8 KB