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


Groups > linux.kernel > #1356297

[PATCH 2/2] f2fs: avoid writepage lock when many threads call fsync

From Jaegeuk Kim <jaegeuk@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 2/2] f2fs: avoid writepage lock when many threads call fsync
Date 2016-03-12 01:20 +0100
Message-ID <rbFrI-5Ti-9@gated-at.bofh.it> (permalink)
References <rbFrH-5Ti-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


If many threads try to write small number of data and fsync, we should avoid
writepages lock contention.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/data.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index e5c762b..fb75699 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1400,7 +1400,8 @@ static int f2fs_write_data_pages(struct address_space *mapping,
 
 	diff = nr_pages_to_write(sbi, DATA, wbc);
 
-	if (!S_ISDIR(inode->i_mode) && wbc->sync_mode == WB_SYNC_ALL) {
+	if (!S_ISDIR(inode->i_mode) && wbc->sync_mode == WB_SYNC_ALL &&
+			!is_inode_flag_set(F2FS_I(inode), FI_NEED_IPU)) {
 		mutex_lock(&sbi->writepages);
 		locked = true;
 	}
-- 
2.6.3

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


Thread

[PATCH 1/2] f2fs: submit node page write bios when really required Jaegeuk Kim <jaegeuk@kernel.org> - 2016-03-12 01:20 +0100
  [PATCH 2/2] f2fs: avoid writepage lock when many threads call fsync Jaegeuk Kim <jaegeuk@kernel.org> - 2016-03-12 01:20 +0100

csiph-web