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>
This commit is contained in:
parent
6e4fee6a14
commit
fa3a914e8b
1 changed files with 2 additions and 4 deletions
|
@ -932,9 +932,8 @@ repeat:
|
||||||
if (kthread_should_stop())
|
if (kthread_should_stop())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
blk_start_plug(&plug);
|
|
||||||
|
|
||||||
mutex_lock(&dcc->cmd_lock);
|
mutex_lock(&dcc->cmd_lock);
|
||||||
|
blk_start_plug(&plug);
|
||||||
list_for_each_entry_safe(dc, tmp, pend_list, list) {
|
list_for_each_entry_safe(dc, tmp, pend_list, list) {
|
||||||
f2fs_bug_on(sbi, dc->state != D_PREP);
|
f2fs_bug_on(sbi, dc->state != D_PREP);
|
||||||
|
|
||||||
|
@ -944,6 +943,7 @@ repeat:
|
||||||
if (iter++ > DISCARD_ISSUE_RATE)
|
if (iter++ > DISCARD_ISSUE_RATE)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
blk_finish_plug(&plug);
|
||||||
|
|
||||||
list_for_each_entry_safe(dc, tmp, wait_list, list) {
|
list_for_each_entry_safe(dc, tmp, wait_list, list) {
|
||||||
if (dc->state == D_DONE) {
|
if (dc->state == D_DONE) {
|
||||||
|
@ -953,8 +953,6 @@ repeat:
|
||||||
}
|
}
|
||||||
mutex_unlock(&dcc->cmd_lock);
|
mutex_unlock(&dcc->cmd_lock);
|
||||||
|
|
||||||
blk_finish_plug(&plug);
|
|
||||||
|
|
||||||
iter = 0;
|
iter = 0;
|
||||||
congestion_wait(BLK_RW_SYNC, HZ/50);
|
congestion_wait(BLK_RW_SYNC, HZ/50);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue