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>
Mon, 26 Nov 2018 23:53:55 +0000 (15:53 -0800)
commite3080b0120a15e648f59491919cb5da0bc9802c3
tree8984364e8eed8de786523e410e7aa0157373b636
parent2c70c5e3874e8cf2f39f4ce4e2b832f4380a0c1b
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