diff options
author | Chao Yu <yuchao0@huawei.com> | 2021-03-27 10:57:06 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-03-31 03:48:56 +0200 |
commit | 5911d2d1d1a38b26585383478bd71d9254e48bdf (patch) | |
tree | cbddc45a5994ba68705f931392f9d7051a3e9eff /fs/f2fs/gc.h | |
parent | f2fs: fix to cover __allocate_new_section() with curseg_lock (diff) | |
download | linux-5911d2d1d1a38b26585383478bd71d9254e48bdf.tar.xz linux-5911d2d1d1a38b26585383478bd71d9254e48bdf.zip |
f2fs: introduce gc_merge mount option
In this patch, we will add two new mount options: "gc_merge" and
"nogc_merge", when background_gc is on, "gc_merge" option can be
set to let background GC thread to handle foreground GC requests,
it can eliminate the sluggish issue caused by slow foreground GC
operation when GC is triggered from a process with limited I/O
and CPU resources.
Original idea is from Xiang.
Signed-off-by: Gao Xiang <xiang@kernel.org>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.h')
-rw-r--r-- | fs/f2fs/gc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/gc.h b/fs/f2fs/gc.h index 0c8dae12dc51..3fe145e8e594 100644 --- a/fs/f2fs/gc.h +++ b/fs/f2fs/gc.h @@ -42,6 +42,12 @@ struct f2fs_gc_kthread { /* for changing gc mode */ unsigned int gc_wake; + + /* for GC_MERGE mount option */ + wait_queue_head_t fggc_wq; /* + * caller of f2fs_balance_fs() + * will wait on this wait queue. + */ }; struct gc_inode_list { |