f2fs: allocate HOT_DATA for IPU writes
Jaegeuk Kim
maintainerPATCH 1/1 f2fs: allocate HOT_DATA for IPU writes
Let's split IPU writes in hot data area to improve the GC efficiency.
--- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/f2fs/segment.c +2 -1
@@ -3688,7 +3688,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)if (file_is_hot (inode) ||is_inode_flag_set (inode,FI_HOT_DATA ) || -f2fs_is_cow_file (inode)) +f2fs_is_cow_file (inode) || +is_inode_flag_set (inode,FI_NEED_IPU ))return CURSEG_HOT_DATA ;return f2fs_rw_hint_to_seg_type (F2FS_I_SB (inode), inode->i_write_hint);
Signature · 1 line
2.51.0.318.gd7df087d1a-goog
Chao Yu
maintainerQuoted 1 line · On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
I didn't get it, IPU may be not friendly for migrating data along w/ write in hot area?
Thanks,
Quoted 20 lines
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/f2fs/segment.c +2
-1@@ -3688,7 +3688,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)if (file_is_hot (inode) ||is_inode_flag_set (inode,FI_HOT_DATA ) || -f2fs_is_cow_file (inode)) +f2fs_is_cow_file (inode) || +is_inode_flag_set (inode,FI_NEED_IPU ))return CURSEG_HOT_DATA ;return f2fs_rw_hint_to_seg_type (F2FS_I_SB (inode), inode->i_write_hint);
Jaegeuk Kim
maintainerQuoted 5 lines · Chao Yu
Quoted 1 line · On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
I didn't get it, IPU may be not friendly for migrating data along w/ write in hot area?
This deals with IPU in the LFS mode.
Quoted 23 lines
Thanks,
Quoted 20 lines
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/f2fs/segment.c +2
-1@@ -3688,7 +3688,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)if (file_is_hot (inode) ||is_inode_flag_set (inode,FI_HOT_DATA ) || -f2fs_is_cow_file (inode)) +f2fs_is_cow_file (inode) || +is_inode_flag_set (inode,FI_NEED_IPU ))return CURSEG_HOT_DATA ;return f2fs_rw_hint_to_seg_type (F2FS_I_SB (inode), inode->i_write_hint);
Chao Yu
maintainerQuoted 8 lines · Jaegeuk Kim
Quoted 5 lines · Chao Yu
Quoted 1 line · On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
I didn't get it, IPU may be not friendly for migrating data along w/ write in hot area?
This deals with IPU in the LFS mode.
Okay, so, we missed to add f2fs_lfs_mode() condition, right?
Thanks,
Quoted 24 lines
Quoted 24 lines
Thanks,
Quoted 20 lines
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/f2fs/segment.c +2
-1@@ -3688,7 +3688,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)if (file_is_hot (inode) ||is_inode_flag_set (inode,FI_HOT_DATA ) || -f2fs_is_cow_file (inode)) +f2fs_is_cow_file (inode) || +is_inode_flag_set (inode,FI_NEED_IPU ))return CURSEG_HOT_DATA ;return f2fs_rw_hint_to_seg_type (F2FS_I_SB (inode), inode->i_write_hint);
Jaegeuk Kim
maintainerQuoted 11 lines · Chao Yu
Quoted 8 lines · Jaegeuk Kim
Quoted 5 lines · Chao Yu
Quoted 1 line · On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
I didn't get it, IPU may be not friendly for migrating data along w/ write in hot area?
This deals with IPU in the LFS mode.
Okay, so, we missed to add
f2fs_lfs_mode()condition, right?
Why do we need that?
Quoted 26 lines
Thanks,
Quoted 23 lines
Quoted 23 lines
Thanks,
Quoted 19 lines
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/f2fs/segment.c +2
-1@@ -3688,7 +3688,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)if (file_is_hot (inode) ||is_inode_flag_set (inode,FI_HOT_DATA ) || -f2fs_is_cow_file (inode)) +f2fs_is_cow_file (inode) || +is_inode_flag_set (inode,FI_NEED_IPU ))return CURSEG_HOT_DATA ;return f2fs_rw_hint_to_seg_type (F2FS_I_SB (inode), inode->i_write_hint);
Chao Yu
maintainerQuoted 6 lines · Jaegeuk Kim
Quoted 5 lines · Chao Yu
Quoted 4 lines · Jaegeuk Kim
Quoted 3 lines · Chao Yu
Quoted 1 line · On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
I didn't get it, IPU may be not friendly for migrating data along w/ write in hot area?
This deals with IPU in the LFS mode.
Okay, so, we missed to add
f2fs_lfs_mode()condition, right?Why do we need that?
As you mentioned above, this deals w/ IPU in the LFS mode. Am I missing something?
Thanks,
Quoted 27 lines
Quoted 27 lines
Thanks,
Quoted 23 lines
Quoted 23 lines
Thanks,
Quoted 19 lines
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/f2fs/segment.c +2
-1@@ -3688,7 +3688,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)if (file_is_hot (inode) ||is_inode_flag_set (inode,FI_HOT_DATA ) || -f2fs_is_cow_file (inode)) +f2fs_is_cow_file (inode) || +is_inode_flag_set (inode,FI_NEED_IPU ))return CURSEG_HOT_DATA ;return f2fs_rw_hint_to_seg_type (F2FS_I_SB (inode), inode->i_write_hint);
Jaegeuk Kim
maintainerQuoted 10 lines · Chao Yu
Quoted 9 lines · Jaegeuk Kim
Quoted 8 lines · Chao Yu
Quoted 7 lines · Jaegeuk Kim
Quoted 5 lines · Chao Yu
Quoted 1 line · On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
I didn't get it, IPU may be not friendly for migrating data along w/ write in hot area?
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
This deals with IPU in the LFS mode.
Okay, so, we missed to add
f2fs_lfs_mode()condition, right?Why do we need that?
As you mentioned above, this deals w/ IPU in the LFS mode. Am I missing something?
The IPU flag indicates the data is hot. In lfs_mode, we missed to allocate it into HOT_DATA. In normal mode, IPU will update the data in place, which doesn't affect anything, while newly create data is also good to store in HOT_DATA as well. So, I think we don't need other condition here.
Quoted 30 lines
Thanks,
Quoted 27 lines
Quoted 27 lines
Thanks,
Quoted 23 lines
Quoted 23 lines
Thanks,
Quoted 19 lines
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/f2fs/segment.c +2
-1@@ -3688,7 +3688,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)if (file_is_hot (inode) ||is_inode_flag_set (inode,FI_HOT_DATA ) || -f2fs_is_cow_file (inode)) +f2fs_is_cow_file (inode) || +is_inode_flag_set (inode,FI_NEED_IPU ))return CURSEG_HOT_DATA ;return f2fs_rw_hint_to_seg_type (F2FS_I_SB (inode), inode->i_write_hint);
Quoted 17 lines · Jaegeuk Kim
Quoted 16 lines · Chao Yu
Quoted 14 lines · Jaegeuk Kim
Quoted 11 lines · Chao Yu
Quoted 8 lines · Jaegeuk Kim
Quoted 5 lines · Chao Yu
Quoted 1 line · On 8/28/25 05:52, Jaegeuk Kim via Linux-f2fs-devel wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
I didn't get it, IPU may be not friendly for migrating data along w/ write in hot area?
This deals with IPU in the LFS mode.
Okay, so, we missed to add
f2fs_lfs_mode()condition, right?Why do we need that?
Quoted 7 lines
Quoted 2 lines
As you mentioned above, this deals w/ IPU in the LFS mode. Am I missing something?
The IPU flag indicates the data is hot. In
lfs_mode, we missed to allocate it intoHOT_DATA. In normal mode, IPU will update the data in place, which doesn't affect anything, while newly create data is also good to store inHOT_DATAas well. So, I think we don't need other condition here.
It makes sense, thanks for the explanation.
Thanks,
Quoted 31 lines
Quoted 31 lines
Thanks,
Quoted 27 lines
Quoted 27 lines
Thanks,
Quoted 23 lines
Quoted 23 lines
Thanks,
Quoted 19 lines
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/f2fs/segment.c +2
-1@@ -3688,7 +3688,8 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)if (file_is_hot (inode) ||is_inode_flag_set (inode,FI_HOT_DATA ) || -f2fs_is_cow_file (inode)) +f2fs_is_cow_file (inode) || +is_inode_flag_set (inode,FI_NEED_IPU ))return CURSEG_HOT_DATA ;return f2fs_rw_hint_to_seg_type (F2FS_I_SB (inode), inode->i_write_hint);
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:
Quoted 6 lines · On Wed, 27 Aug 2025 21:52:22 +0000 you wrote:
Let's split IPU writes in hot data area to improve the GC efficiency.
Signed-off-by Jaegeuk Kim <[email protected]>--- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Here is the summary with links:
- [f2fs-dev] f2fs: allocate HOT_DATA for IPU writes
https://git.kernel.org/jaegeuk/f2fs/c/c872b6279cd2
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html