Commit d5793249 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: assign allocation hint for warm/cold data

This patch gives slower device region to warm/cold data area more eagerly.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent d07efb50
...@@ -1033,4 +1033,9 @@ void build_gc_manager(struct f2fs_sb_info *sbi) ...@@ -1033,4 +1033,9 @@ void build_gc_manager(struct f2fs_sb_info *sbi)
sbi->fggc_threshold = div64_u64((main_count - ovp_count) * sbi->fggc_threshold = div64_u64((main_count - ovp_count) *
BLKS_PER_SEC(sbi), (main_count - resv_count)); BLKS_PER_SEC(sbi), (main_count - resv_count));
/* give warm/cold data area from slower device */
if (sbi->s_ndevs && sbi->segs_per_sec == 1)
SIT_I(sbi)->last_victim[ALLOC_NEXT] =
GET_SEGNO(sbi, FDEV(0).end_blk) + 1;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment