Skip to content

Commit f74a7be

Browse files
KanishkTheDerpkardebayan
authored andcommitted
fs: Lower reclaim segment and threshold
• Xiaomi's default segment reclamation (4096), along with that of other OEMs, is designed for MIUI, HyperOS's, and other $hit stocks roms. heavy I/O patterns (background services, frequent writes). For AOSP: 1. Lower Overhead: Smaller Garbage Collection (GC) batches reduce CPU/storage load. 2. Better Responsiveness: Avoid long GC pauses during light usage. 3. Battery Savings: Less aggressive reclaiming reduces power spikes. Change-Id: Ic3af1a6cc6377d73de9ad9c2994d940453e04d43 Signed-off-by: Kanishk <kanishkthederp@gmail.com> Signed-off-by: TogoFire <togofire@mailfence.com>
1 parent cfa0ab3 commit f74a7be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/f2fs/segment.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#define NULL_SEGNO ((unsigned int)(~0))
1313
#define NULL_SECNO ((unsigned int)(~0))
1414

15-
#define DEF_RECLAIM_PREFREE_SEGMENTS 5 /* 5% over total segments */
16-
#define DEF_MAX_RECLAIM_PREFREE_SEGMENTS 4096 /* 8GB in maximum */
15+
#define DEF_RECLAIM_PREFREE_SEGMENTS 3 /* 3% over total segments */
16+
#define DEF_MAX_RECLAIM_PREFREE_SEGMENTS 1024 /* 8GB in maximum */
1717

1818
#define F2FS_MIN_SEGMENTS 9 /* SB + 2 (CP + SIT + NAT) + SSA + MAIN */
1919

0 commit comments

Comments
 (0)