Skip to content

Commit

Permalink
f2fs: assign allocation hint for warm/cold data
Browse files Browse the repository at this point in the history
This patch gives slower device region to warm/cold data area more eagerly.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Jaegeuk Kim committed Apr 24, 2017
1 parent d07efb5 commit d579324
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/f2fs/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,9 @@ void build_gc_manager(struct f2fs_sb_info *sbi)

sbi->fggc_threshold = div64_u64((main_count - ovp_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;
}

0 comments on commit d579324

Please sign in to comment.