Skip to content

Commit

Permalink
f2fs/gc: Reduce GC thread urgent sleep time to 50ms
Browse files Browse the repository at this point in the history
Android sets the value to 50ms via vold's IdleMaint service. Since
500ms is too long for GC to colllect all invalid segments in time
which results in performance degradation.

On un-encrypted device, vold fails to set this value to 50ms thus
degrades the performance over time.

Change-Id: I80f2c29558393d726d5e696aaf285096c8108b23
  • Loading branch information
Panchajanya1999 authored and ananjaser1211 committed Jul 24, 2023
1 parent 338b819 commit 8451d74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* whether IO subsystem is idle
* or not
*/
#define DEF_GC_THREAD_URGENT_SLEEP_TIME 500 /* 500 ms */
#define DEF_GC_THREAD_URGENT_SLEEP_TIME 50 /* 50 ms */
#define DEF_GC_THREAD_MIN_SLEEP_TIME 30000 /* milliseconds */
#define DEF_GC_THREAD_MAX_SLEEP_TIME 60000
#define DEF_GC_THREAD_NOGC_SLEEP_TIME 300000 /* wait 5 min */
Expand Down

0 comments on commit 8451d74

Please sign in to comment.