Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609705

[PATCH 2/3] f2fs: shrink blk plug region

From Chao Yu <yuchao0@huawei.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] f2fs: shrink blk plug region
Date 2017-03-27 12:20 +0200
Message-ID <tpzUK-6u4-27@gated-at.bofh.it> (permalink)
References <tpzUJ-6u4-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Don't use blk plug covering area where there won't be any IOs being issued.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/segment.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index c1a03b0857f9..57a81f9c8c14 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -848,9 +848,8 @@ static int issue_discard_thread(void *data)
 	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);
 
@@ -860,6 +859,7 @@ static int issue_discard_thread(void *data)
 		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)
@@ -867,8 +867,6 @@ static int issue_discard_thread(void *data)
 	}
 	mutex_unlock(&dcc->cmd_lock);
 
-	blk_finish_plug(&plug);
-
 	iter = 0;
 	congestion_wait(BLK_RW_SYNC, HZ/50);
 
-- 
2.8.2.295.g3f1c1d0

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] f2fs: clean up destroy_discard_cmd_control Chao Yu <yuchao0@huawei.com> - 2017-03-27 12:20 +0200
  [PATCH 2/3] f2fs: shrink blk plug region Chao Yu <yuchao0@huawei.com> - 2017-03-27 12:20 +0200

csiph-web