linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] f2fs: avoid needless lock for node pages when fsyncing a file
@ 2016-04-26  0:06 Jaegeuk Kim
  2016-04-26  0:06 ` [PATCH 2/7] f2fs: avoid writing 0'th page in volatile writes Jaegeuk Kim
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Jaegeuk Kim @ 2016-04-26  0:06 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim

When fsync is called, sync_node_pages finds a proper direct node pages to flush.
But, it locks unrelated direct node pages together unnecessarily.

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

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 095fc2c..cccee50 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1272,10 +1272,14 @@ next_step:
 			 * we should not skip writing node pages.
 			 */
 lock_node:
-			if (ino && ino_of_node(page) == ino)
-				lock_page(page);
-			else if (!trylock_page(page))
+			if (ino) {
+				if (ino_of_node(page) == ino)
+					lock_page(page);
+				else
+					continue;
+			} else if (!trylock_page(page)) {
 				continue;
+			}
 
 			if (unlikely(page->mapping != NODE_MAPPING(sbi))) {
 continue_unlock:
-- 
2.6.3


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-04-27 17:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26  0:06 [PATCH 1/7] f2fs: avoid needless lock for node pages when fsyncing a file Jaegeuk Kim
2016-04-26  0:06 ` [PATCH 2/7] f2fs: avoid writing 0'th page in volatile writes Jaegeuk Kim
2016-04-26  0:06 ` [PATCH 3/7] f2fs: split sync_node_pages with fsync_node_pages Jaegeuk Kim
2016-04-26  0:06 ` [PATCH 4/7] f2fs: report unwritten status in fsync_node_pages Jaegeuk Kim
2016-04-26  0:06 ` [PATCH 5/7] f2fs: set fsync mark only for the last dnode Jaegeuk Kim
2016-04-26  0:06 ` [PATCH 6/7] f2fs: issue cache flush on direct IO Jaegeuk Kim
2016-04-26  0:07 ` [PATCH 7/7] f2fs: should check the remaining dentry bits Jaegeuk Kim
2016-04-26  2:53   ` [PATCH v2 " Jaegeuk Kim
2016-04-27 14:22   ` [f2fs-dev] [PATCH " Chao Yu
2016-04-27 17:40     ` Jaegeuk Kim
2016-04-26 12:51 ` [f2fs-dev] [PATCH 1/7] f2fs: avoid needless lock for node pages when fsyncing a file Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).