From 8451d74509b135c667a0c987c47d62d2dfb55a1f Mon Sep 17 00:00:00 2001 From: Panchajanya1999 Date: Wed, 16 Feb 2022 00:26:59 +0530 Subject: [PATCH] f2fs/gc: Reduce GC thread urgent sleep time to 50ms 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 --- fs/f2fs/gc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/gc.h b/fs/f2fs/gc.h index bbac9d3787bd..f489f52f6dd3 100755 --- a/fs/f2fs/gc.h +++ b/fs/f2fs/gc.h @@ -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 */