diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-04-24 00:00:14 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-04-25 21:35:03 -0400 |
commit | 6cb968d9b0358c7e807416a85699a526e820083c (patch) | |
tree | 8958e38642c540ea611b37b083e77e701a780c1a /fs/f2fs/gc.c | |
parent | 2af4bd6ca556d690ee166200abd16fdbe749782e (diff) |
f2fs: avoid frequent background GC
If there is no victim segments selected by background GC, let's wait
a little bit longer time to collect dirty segments.
By default, let's give 5 minutes.
Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r-- | fs/f2fs/gc.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 1ca332455ee2..6ed3263eeee8 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c | |||
@@ -82,9 +82,6 @@ static int gc_thread_func(void *data) | |||
82 | /* if return value is not zero, no victim was selected */ | 82 | /* if return value is not zero, no victim was selected */ |
83 | if (f2fs_gc(sbi)) | 83 | if (f2fs_gc(sbi)) |
84 | wait_ms = GC_THREAD_NOGC_SLEEP_TIME; | 84 | wait_ms = GC_THREAD_NOGC_SLEEP_TIME; |
85 | else if (wait_ms == GC_THREAD_NOGC_SLEEP_TIME) | ||
86 | wait_ms = GC_THREAD_MAX_SLEEP_TIME; | ||
87 | |||
88 | } while (!kthread_should_stop()); | 85 | } while (!kthread_should_stop()); |
89 | return 0; | 86 | return 0; |
90 | } | 87 | } |