f2fs: support subsectional garbage collection
authorChao Yu <yuchao0@huawei.com>
Wed, 24 Oct 2018 10:37:27 +0000 (18:37 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 2 Jan 2019 23:42:27 +0000 (15:42 -0800)
commitecab02ec7cf629b84bcfa4c3b2bf34daca8bd3f9
treea3223e55f0946f2d02f485668a1168d5f42d1e7c
parente897be4a3cb387d39c180e99d1531c6ef14caa6f
f2fs: support subsectional garbage collection

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: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/gc.c
fs/f2fs/super.c