Lines Matching refs:gc_th
34 struct f2fs_gc_kthread *gc_th = sbi->gc_thread; in gc_thread_func() local
43 wait_ms = gc_th->min_sleep_time; in gc_thread_func()
52 gc_th->gc_wake, in gc_thread_func()
59 if (gc_th->gc_wake) in gc_thread_func()
60 gc_th->gc_wake = false; in gc_thread_func()
70 increase_sleep_time(gc_th, &wait_ms); in gc_thread_func()
101 wait_ms = gc_th->urgent_sleep_time; in gc_thread_func()
115 increase_sleep_time(gc_th, &wait_ms); in gc_thread_func()
123 gc_th->no_zoned_gc_percent)) { in gc_thread_func()
124 wait_ms = gc_th->no_gc_sleep_time; in gc_thread_func()
128 if (wait_ms == gc_th->no_gc_sleep_time) in gc_thread_func()
129 wait_ms = gc_th->max_sleep_time; in gc_thread_func()
133 decrease_sleep_time(gc_th, &wait_ms); in gc_thread_func()
137 increase_sleep_time(gc_th, &wait_ms); in gc_thread_func()
158 wait_ms = gc_th->no_gc_sleep_time; in gc_thread_func()
161 if (wait_ms == gc_th->no_gc_sleep_time) in gc_thread_func()
162 wait_ms = gc_th->min_sleep_time; in gc_thread_func()
166 wake_up_all(&gc_th->fggc_wq); in gc_thread_func()
191 struct f2fs_gc_kthread *gc_th; in f2fs_start_gc_thread() local
194 gc_th = f2fs_kmalloc(sbi, sizeof(struct f2fs_gc_kthread), GFP_KERNEL); in f2fs_start_gc_thread()
195 if (!gc_th) in f2fs_start_gc_thread()
198 gc_th->urgent_sleep_time = DEF_GC_THREAD_URGENT_SLEEP_TIME; in f2fs_start_gc_thread()
199 gc_th->valid_thresh_ratio = DEF_GC_THREAD_VALID_THRESH_RATIO; in f2fs_start_gc_thread()
202 gc_th->min_sleep_time = DEF_GC_THREAD_MIN_SLEEP_TIME_ZONED; in f2fs_start_gc_thread()
203 gc_th->max_sleep_time = DEF_GC_THREAD_MAX_SLEEP_TIME_ZONED; in f2fs_start_gc_thread()
204 gc_th->no_gc_sleep_time = DEF_GC_THREAD_NOGC_SLEEP_TIME_ZONED; in f2fs_start_gc_thread()
205 gc_th->no_zoned_gc_percent = LIMIT_NO_ZONED_GC; in f2fs_start_gc_thread()
206 gc_th->boost_zoned_gc_percent = LIMIT_BOOST_ZONED_GC; in f2fs_start_gc_thread()
208 gc_th->min_sleep_time = DEF_GC_THREAD_MIN_SLEEP_TIME; in f2fs_start_gc_thread()
209 gc_th->max_sleep_time = DEF_GC_THREAD_MAX_SLEEP_TIME; in f2fs_start_gc_thread()
210 gc_th->no_gc_sleep_time = DEF_GC_THREAD_NOGC_SLEEP_TIME; in f2fs_start_gc_thread()
211 gc_th->no_zoned_gc_percent = 0; in f2fs_start_gc_thread()
212 gc_th->boost_zoned_gc_percent = 0; in f2fs_start_gc_thread()
215 gc_th->gc_wake = false; in f2fs_start_gc_thread()
217 sbi->gc_thread = gc_th; in f2fs_start_gc_thread()
222 if (IS_ERR(gc_th->f2fs_gc_task)) { in f2fs_start_gc_thread()
223 int err = PTR_ERR(gc_th->f2fs_gc_task); in f2fs_start_gc_thread()
225 kfree(gc_th); in f2fs_start_gc_thread()
235 struct f2fs_gc_kthread *gc_th = sbi->gc_thread; in f2fs_stop_gc_thread() local
237 if (!gc_th) in f2fs_stop_gc_thread()
239 kthread_stop(gc_th->f2fs_gc_task); in f2fs_stop_gc_thread()
240 wake_up_all(&gc_th->fggc_wq); in f2fs_stop_gc_thread()
241 kfree(gc_th); in f2fs_stop_gc_thread()