diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-03-27 12:14:05 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-04-12 21:57:05 +0200 |
commit | a54455f5eeb8d65455a27b3ace99f9af295b2897 (patch) | |
tree | c4de3e0e839495e8e06f15306d280489f0e1f290 /fs | |
parent | f2fs: extract rb-tree operation infrastructure (diff) | |
download | linux-a54455f5eeb8d65455a27b3ace99f9af295b2897.tar.xz linux-a54455f5eeb8d65455a27b3ace99f9af295b2897.zip |
f2fs: shrink blk plug region
Don't use blk plug covering area where there won't be any IOs being issued.
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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 471ea9944412..58cfbe3d4dc7 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -853,9 +853,8 @@ repeat: if (kthread_should_stop()) return 0; - blk_start_plug(&plug); - mutex_lock(&dcc->cmd_lock); + blk_start_plug(&plug); list_for_each_entry_safe(dc, tmp, pend_list, list) { f2fs_bug_on(sbi, dc->state != D_PREP); @@ -865,6 +864,7 @@ repeat: if (iter++ > DISCARD_ISSUE_RATE) break; } + blk_finish_plug(&plug); list_for_each_entry_safe(dc, tmp, wait_list, list) { if (dc->state == D_DONE) { @@ -874,8 +874,6 @@ repeat: } mutex_unlock(&dcc->cmd_lock); - blk_finish_plug(&plug); - iter = 0; congestion_wait(BLK_RW_SYNC, HZ/50); |