gc.h (9938b04472d5c59f8bd8152a548533a8599596a2) gc.h (d9872a698c393e0d1abca86bf05b62712cbfc581)
1/*
2 * fs/f2fs/gc.h
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#define GC_THREAD_MIN_WB_PAGES 1 /*
12 * a threshold to determine
13 * whether IO subsystem is idle
14 * or not
15 */
1/*
2 * fs/f2fs/gc.h
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#define GC_THREAD_MIN_WB_PAGES 1 /*
12 * a threshold to determine
13 * whether IO subsystem is idle
14 * or not
15 */
16#define DEF_GC_THREAD_URGENT_SLEEP_TIME 500 /* 500 ms */
16#define DEF_GC_THREAD_MIN_SLEEP_TIME 30000 /* milliseconds */
17#define DEF_GC_THREAD_MAX_SLEEP_TIME 60000
18#define DEF_GC_THREAD_NOGC_SLEEP_TIME 300000 /* wait 5 min */
19#define LIMIT_INVALID_BLOCK 40 /* percentage over total user space */
20#define LIMIT_FREE_BLOCK 40 /* percentage over invalid + free space */
21
22/* Search max. number of dirty segments to select a victim segment */
23#define DEF_MAX_VICTIM_SEARCH 4096 /* covers 8GB */
24
25struct f2fs_gc_kthread {
26 struct task_struct *f2fs_gc_task;
27 wait_queue_head_t gc_wait_queue_head;
28
29 /* for gc sleep time */
17#define DEF_GC_THREAD_MIN_SLEEP_TIME 30000 /* milliseconds */
18#define DEF_GC_THREAD_MAX_SLEEP_TIME 60000
19#define DEF_GC_THREAD_NOGC_SLEEP_TIME 300000 /* wait 5 min */
20#define LIMIT_INVALID_BLOCK 40 /* percentage over total user space */
21#define LIMIT_FREE_BLOCK 40 /* percentage over invalid + free space */
22
23/* Search max. number of dirty segments to select a victim segment */
24#define DEF_MAX_VICTIM_SEARCH 4096 /* covers 8GB */
25
26struct f2fs_gc_kthread {
27 struct task_struct *f2fs_gc_task;
28 wait_queue_head_t gc_wait_queue_head;
29
30 /* for gc sleep time */
31 unsigned int urgent_sleep_time;
30 unsigned int min_sleep_time;
31 unsigned int max_sleep_time;
32 unsigned int no_gc_sleep_time;
33
34 /* for changing gc mode */
35 unsigned int gc_idle;
32 unsigned int min_sleep_time;
33 unsigned int max_sleep_time;
34 unsigned int no_gc_sleep_time;
35
36 /* for changing gc mode */
37 unsigned int gc_idle;
38 unsigned int gc_urgent;
39 unsigned int gc_wake;
36};
37
38struct gc_inode_list {
39 struct list_head ilist;
40 struct radix_tree_root iroot;
41};
42
43/*

--- 59 unchanged lines hidden ---
40};
41
42struct gc_inode_list {
43 struct list_head ilist;
44 struct radix_tree_root iroot;
45};
46
47/*

--- 59 unchanged lines hidden ---