diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-04-19 01:03:15 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-04-24 23:06:53 +0300 |
commit | d579324998a39fa6e13edea2f06506840df9b729 (patch) | |
tree | 31a502bdbbcf03803b2ddb22dd0ac10a5cc11964 /fs/f2fs/gc.c | |
parent | d07efb507779171bd670e8a12f283a3e245cde08 (diff) | |
download | linux-d579324998a39fa6e13edea2f06506840df9b729.tar.xz |
f2fs: assign allocation hint for warm/cold data
This patch gives slower device region to warm/cold data area more eagerly.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
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 74a10b7675f5..84db41ca27c1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -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; } |