diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-24 20:05:13 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-04-05 11:05:05 -0700 |
commit | ef095d19e82f25bbdead472b8b71f4ef3b7a636d (patch) | |
tree | 2eb2262bb5ef4baa05b44d592bf30e4c8872cd72 /fs/f2fs/data.c | |
parent | a7eeb823854c4ab19765a25fabbda07fe27be177 (diff) | |
download | linux-ef095d19e82f25bbdead472b8b71f4ef3b7a636d.tar.bz2 |
f2fs: write small sized IO to hot log
It would better split small and large IOs separately in order to get more
consecutive big writes.
The default threshold is set to 64KB, but configurable by sysfs/min_hot_blocks.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 090413236b27..8f36080b47c4 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1432,6 +1432,8 @@ write: need_balance_fs = true; else if (has_not_enough_free_secs(sbi, 0, 0)) goto redirty_out; + else + set_inode_flag(inode, FI_HOT_DATA); err = -EAGAIN; if (f2fs_has_inline_data(inode)) { @@ -1457,6 +1459,7 @@ out: if (wbc->for_reclaim) { f2fs_submit_merged_bio_cond(sbi, inode, 0, page->index, DATA, WRITE); + clear_inode_flag(inode, FI_HOT_DATA); remove_dirty_inode(inode); submitted = NULL; } @@ -1511,6 +1514,12 @@ static int f2fs_write_cache_pages(struct address_space *mapping, pagevec_init(&pvec, 0); + if (get_dirty_pages(mapping->host) <= + SM_I(F2FS_M_SB(mapping))->min_hot_blocks) + set_inode_flag(mapping->host, FI_HOT_DATA); + else + clear_inode_flag(mapping->host, FI_HOT_DATA); + if (wbc->range_cyclic) { writeback_index = mapping->writeback_index; /* prev offset */ index = writeback_index; |