File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1728,10 +1728,18 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
1728
1728
sec_end_segno -= SEGS_PER_SEC (sbi ) -
1729
1729
f2fs_usable_segs_in_sec (sbi , segno );
1730
1730
1731
- if (gc_type == BG_GC )
1732
- end_segno = start_segno +
1731
+ if (gc_type == BG_GC ) {
1732
+ unsigned int window_granularity =
1733
1733
sbi -> migration_window_granularity ;
1734
1734
1735
+ if (f2fs_sb_has_blkzoned (sbi ) &&
1736
+ !has_enough_free_blocks (sbi ,
1737
+ LIMIT_BOOST_ZONED_GC ))
1738
+ window_granularity *= BOOST_GC_MULTIPLE ;
1739
+
1740
+ end_segno = start_segno + window_granularity ;
1741
+ }
1742
+
1735
1743
if (end_segno > sec_end_segno )
1736
1744
end_segno = sec_end_segno ;
1737
1745
}
Original file line number Diff line number Diff line change 33
33
#define LIMIT_NO_ZONED_GC 60 /* percentage over total user space of no gc for zoned devices */
34
34
#define LIMIT_BOOST_ZONED_GC 25 /* percentage over total user space of boosted gc for zoned devices */
35
35
#define DEF_MIGRATION_WINDOW_GRANULARITY_ZONED 3
36
+ #define BOOST_GC_MULTIPLE 5
36
37
37
38
#define DEF_GC_FAILED_PINNED_FILES 2048
38
39
#define MAX_GC_FAILED_PINNED_FILES USHRT_MAX
You can’t perform that action at this time.
0 commit comments