* [PATCH 1/2] f2fs: submit node page write bios when really required
@ 2016-03-12 0:14 ` Jaegeuk Kim
0 siblings, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2016-03-12 0:14 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim
If many threads calls fsync with data writes, we don't need to flush every
bios having node page writes.
The f2fs_wait_on_page_writeback will flush its bios when the page is really
needed.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/node.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 771166d..118321b 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1236,7 +1236,7 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino,
pgoff_t index, end;
struct pagevec pvec;
int step = ino ? 2 : 0;
- int nwritten = 0, wrote = 0;
+ int nwritten = 0;
pagevec_init(&pvec, 0);
@@ -1326,8 +1326,6 @@ continue_unlock:
if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc))
unlock_page(page);
- else
- wrote++;
if (--wbc->nr_to_write == 0)
break;
@@ -1345,14 +1343,6 @@ continue_unlock:
step++;
goto next_step;
}
-
- if (wrote) {
- if (ino)
- f2fs_submit_merged_bio_cond(sbi, NULL, NULL,
- ino, NODE, WRITE);
- else
- f2fs_submit_merged_bio(sbi, NODE, WRITE);
- }
return nwritten;
}
--
2.6.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/2] f2fs: submit node page write bios when really required
@ 2016-03-12 0:14 ` Jaegeuk Kim
0 siblings, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2016-03-12 0:14 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim
If many threads calls fsync with data writes, we don't need to flush every
bios having node page writes.
The f2fs_wait_on_page_writeback will flush its bios when the page is really
needed.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/node.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 771166d..118321b 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1236,7 +1236,7 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino,
pgoff_t index, end;
struct pagevec pvec;
int step = ino ? 2 : 0;
- int nwritten = 0, wrote = 0;
+ int nwritten = 0;
pagevec_init(&pvec, 0);
@@ -1326,8 +1326,6 @@ continue_unlock:
if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc))
unlock_page(page);
- else
- wrote++;
if (--wbc->nr_to_write == 0)
break;
@@ -1345,14 +1343,6 @@ continue_unlock:
step++;
goto next_step;
}
-
- if (wrote) {
- if (ino)
- f2fs_submit_merged_bio_cond(sbi, NULL, NULL,
- ino, NODE, WRITE);
- else
- f2fs_submit_merged_bio(sbi, NODE, WRITE);
- }
return nwritten;
}
--
2.6.3
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] f2fs: avoid writepage lock when many threads call fsync
2016-03-12 0:14 ` Jaegeuk Kim
@ 2016-03-12 0:14 ` Jaegeuk Kim
-1 siblings, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2016-03-12 0:14 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] f2fs: avoid writepage lock when many threads call fsync
@ 2016-03-12 0:14 ` Jaegeuk Kim
0 siblings, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2016-03-12 0:14 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim
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
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-12 0:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-12 0:14 [PATCH 1/2] f2fs: submit node page write bios when really required Jaegeuk Kim
2016-03-12 0:14 ` Jaegeuk Kim
2016-03-12 0:14 ` [PATCH 2/2] f2fs: avoid writepage lock when many threads call fsync Jaegeuk Kim
2016-03-12 0:14 ` Jaegeuk Kim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.