summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaeho Jeong <daehojeong@google.com>2025-10-07 09:46:14 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2025-10-24 21:23:55 +0000
commit81464df36094340395cadc9235e24eb4defa8c43 (patch)
tree89905a738e95e998a94c8bf672a2f043b34c6c8c
parente462fc48ceb8224811c3224650afed05cb7f0872 (diff)
f2fs: set default valid_thresh_ratio to 80 for zoned devices
Zoned storage devices provide marginal over-capacity space, typically around 10%, for filesystem level storage control. By utilizing this extra capacity, we can safely reduce the default 'valid_thresh_ratio' to 80. This action helps to significantly prevent excessive garbage collection (GC) and the resulting power consumption, as the filesystem becomes less aggressive about cleaning segments that still hold a high percentage of valid data. Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Daeho Jeong <daehojeong@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/gc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/gc.h b/fs/f2fs/gc.h
index 24e8b1c27acc..6c4d4567571e 100644
--- a/fs/f2fs/gc.h
+++ b/fs/f2fs/gc.h
@@ -25,7 +25,7 @@
#define DEF_GC_THREAD_CANDIDATE_RATIO 20 /* select 20% oldest sections as candidates */
#define DEF_GC_THREAD_MAX_CANDIDATE_COUNT 10 /* select at most 10 sections as candidates */
#define DEF_GC_THREAD_AGE_WEIGHT 60 /* age weight */
-#define DEF_GC_THREAD_VALID_THRESH_RATIO 95 /* do not GC over 95% valid block ratio for one time GC */
+#define DEF_GC_THREAD_VALID_THRESH_RATIO 80 /* do not GC over 80% valid block ratio for one time GC */
#define DEFAULT_ACCURACY_CLASS 10000 /* accuracy class */
#define LIMIT_INVALID_BLOCK 40 /* percentage over total user space */