diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-01-26 20:41:23 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-02-11 20:04:44 -0500 |
commit | bba681cbb231920a786cd7303462fb2632af6f36 (patch) | |
tree | 9937a96f18dec591769f0fc677587148c24fac9e /fs/f2fs/super.c | |
parent | 487261f39bcd8983f55c611e299f70f34659674b (diff) |
f2fs: introduce a batched trim
This patch introduces a batched trimming feature, which submits split discard
commands.
This is to avoid long latency due to huge trim commands.
If fstrim was triggered ranging from 0 to the end of device, we should lock
all the checkpoint-related mutexes, resulting in very long latency.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 1e92c2ea6bc1..f2fe666a6ea9 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -195,6 +195,7 @@ F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_no_gc_sleep_time, no_gc_sleep_time); | |||
195 | F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_idle, gc_idle); | 195 | F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_idle, gc_idle); |
196 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, reclaim_segments, rec_prefree_segments); | 196 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, reclaim_segments, rec_prefree_segments); |
197 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, max_small_discards, max_discards); | 197 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, max_small_discards, max_discards); |
198 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, batched_trim_sections, trim_sections); | ||
198 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, ipu_policy, ipu_policy); | 199 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, ipu_policy, ipu_policy); |
199 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, min_ipu_util, min_ipu_util); | 200 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, min_ipu_util, min_ipu_util); |
200 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, min_fsync_blocks, min_fsync_blocks); | 201 | F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, min_fsync_blocks, min_fsync_blocks); |
@@ -210,6 +211,7 @@ static struct attribute *f2fs_attrs[] = { | |||
210 | ATTR_LIST(gc_idle), | 211 | ATTR_LIST(gc_idle), |
211 | ATTR_LIST(reclaim_segments), | 212 | ATTR_LIST(reclaim_segments), |
212 | ATTR_LIST(max_small_discards), | 213 | ATTR_LIST(max_small_discards), |
214 | ATTR_LIST(batched_trim_sections), | ||
213 | ATTR_LIST(ipu_policy), | 215 | ATTR_LIST(ipu_policy), |
214 | ATTR_LIST(min_ipu_util), | 216 | ATTR_LIST(min_ipu_util), |
215 | ATTR_LIST(min_fsync_blocks), | 217 | ATTR_LIST(min_fsync_blocks), |