summaryrefslogtreecommitdiff
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2020-08-04 16:14:46 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2020-09-11 00:03:30 +0300
commit6f3a01ae9b72d5b7c57632632b8c8088db11e7ab (patch)
treea4c18bec6c8de874fa7dfea3ec569f3bb1b062af /fs/f2fs/gc.c
parentd0b9e42ab6155dc05fc83f00af9f45d4dd02264d (diff)
downloadlinux-6f3a01ae9b72d5b7c57632632b8c8088db11e7ab.tar.xz
f2fs: record average update time of segment
Previously, once we update one block in segment, we will update mtime of segment to last time, making aged segment becoming freshest, result in that GC with cost benefit algorithm missing such segment, So this patch changes to record mtime as average block updating time instead of last updating time. It's not needed to reset mtime for prefree segment, as se->valid_blocks is zero, then old se->mtime won't take any weight with below calculation: se->mtime = div_u64(se->mtime * se->valid_blocks + mtime, se->valid_blocks + 1); Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
0 files changed, 0 insertions, 0 deletions