From 9566261ba14eb6901789aca202142d905e8b5d4a Mon Sep 17 00:00:00 2001 From: Park Ju Hyung Date: Mon, 1 Jun 2020 19:45:02 +0900 Subject: [PATCH] f2fs: reduce timeout for uncongestion On high fs utilization, congestion is hit quite frequently and waiting for a whooping 20ms is too expensive, especially on critical paths. Reduce it to an amount that is unlikely to affect UI rendering paths. The new times are as follows: 100 Hz => 1 jiffy (effective: 10 ms) 250 Hz => 2 jiffies (effective: 8 ms) 300 Hz => 2 jiffies (effective: 6 ms) 1000 Hz => 6 jiffies (effective: 6 ms) Co-authored-by: Danny Lin Signed-off-by: Park Ju Hyung Signed-off-by: Adam W. Willis Signed-off-by: LibXZR --- fs/f2fs/f2fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 539aa724e389..a6ccb9a0f8a0 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -580,8 +580,8 @@ enum { #define DEFAULT_RETRY_IO_COUNT 8 /* maximum retry read IO or flush count */ -/* congestion wait timeout value, default: 20ms */ -#define DEFAULT_IO_TIMEOUT (msecs_to_jiffies(20)) +/* congestion wait timeout value, default: 6ms */ +#define DEFAULT_IO_TIMEOUT (msecs_to_jiffies(6)) /* maximum retry quota flush count */ #define DEFAULT_RETRY_QUOTA_FLUSH_COUNT 8