diff options
| author | Chao Yu <yuchao0@huawei.com> | 2017-04-25 00:21:34 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-21 18:42:50 +0200 |
| commit | 83c5babdfc10b32044f7100c15a0a2a5eef2ad0b (patch) | |
| tree | 171024b495443210afe7dd01d1ef9b302d1f9aac | |
| parent | fc07a547d0d9deb55115228347f97b2a2905afab (diff) | |
f2fs: delay awaking discard thread
It's better to delay awaking discard thread while queuing discard commands
in checkpoint, it will help to give more chances for merging big and small
discard.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/segment.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 91274c94f..e68c3965d 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1106,7 +1106,6 @@ static int __queue_discard_cmd(struct f2fs_sb_info *sbi, blkstart -= FDEV(devi).start_blk; } __update_discard_tree_range(sbi, bdev, lblkstart, blkstart, blklen); - wake_up(&SM_I(sbi)->dcc_info->discard_wait_queue); return 0; } @@ -1473,6 +1472,8 @@ skip: SM_I(sbi)->dcc_info->nr_discards -= total_len; kmem_cache_free(discard_entry_slab, entry); } + + wake_up(&SM_I(sbi)->dcc_info->discard_wait_queue); } static int create_discard_cmd_control(struct f2fs_sb_info *sbi) |
