diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-02-27 06:12:24 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-02-27 06:40:36 -0500 |
commit | 81c1a0f13e6306a76fc3743b8504085d96659a5f (patch) | |
tree | 977ddb17842f5ae24856c1fdf7192d1ae1666840 /fs/f2fs/gc.c | |
parent | ab9fa662e4867455f44f4de96d29a7f09cf292c6 (diff) |
f2fs: readahead contiguous SSA blocks for f2fs_gc
If there are multi segments in one section, we will read those SSA blocks which
have contiguous address one by one in f2fs_gc. It may lost performance, let's
read ahead SSA blocks by merge multi read request.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r-- | fs/f2fs/gc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b161db4a96a4..d94acbc3d928 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c | |||
@@ -708,6 +708,11 @@ gc_more: | |||
708 | goto stop; | 708 | goto stop; |
709 | ret = 0; | 709 | ret = 0; |
710 | 710 | ||
711 | /* readahead multi ssa blocks those have contiguous address */ | ||
712 | if (sbi->segs_per_sec > 1) | ||
713 | ra_meta_pages(sbi, GET_SUM_BLOCK(sbi, segno), sbi->segs_per_sec, | ||
714 | META_SSA); | ||
715 | |||
711 | for (i = 0; i < sbi->segs_per_sec; i++) | 716 | for (i = 0; i < sbi->segs_per_sec; i++) |
712 | do_garbage_collect(sbi, segno + i, &ilist, gc_type); | 717 | do_garbage_collect(sbi, segno + i, &ilist, gc_type); |
713 | 718 | ||