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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user