summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChao Yu2017-04-24 18:21:34 +0200
committerJaegeuk Kim2017-04-25 23:18:44 +0200
commit34e159da418be46986456daf21a339932f349b63 (patch)
tree987ee675f3d5d2a7b537cf2b0607f46d785ebdb0 /fs
parentf2fs: seperate read nat page from nat_tree_lock (diff)
downloadkernel-qcow2-linux-34e159da418be46986456daf21a339932f349b63.tar.gz
kernel-qcow2-linux-34e159da418be46986456daf21a339932f349b63.tar.xz
kernel-qcow2-linux-34e159da418be46986456daf21a339932f349b63.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/segment.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 45da59b72035..b27ae5f6a87f 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -968,7 +968,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;
}
@@ -1335,6 +1334,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)