]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitafa16fea4b14b1d5c7a3d70e82c158033b3c3d38
tree8984364e8eed8de786523e410e7aa0157373b636
parentb6e1f022e23590fd174cd374bc88ddec64f62bcc
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