[f2fs-dev] [PATCH v1] f2fs: New victim selection for GC

2023-10-26 Thread Yonggil Song
hen selecting GC victims. This was achieved by reducing the migration of the node blocks by 69.4% (253,131,743 blks -> 77,463,278 blks). It is possible to achieve low WAF performance with the GC victim selection method in environments where the section size is relatively small. Signed-off-by: Yonggi

[f2fs-dev] [PATCH v1] f2fs: New victim selection for GC

2023-10-12 Thread Yonggil Song
hen selecting GC victims. This was achieved by reducing the migration of the node blocks by 69.4% (253,131,743 blks -> 77,463,278 blks). It is possible to achieve low WAF performance with the GC victim selection method in environments where the section size is relatively small. Signed-off-by: Y

[f2fs-dev] [PATCH v1] f2fs: fix typo

2022-09-01 Thread Yonggil Song
Fix typo in f2fs.h Detected by Jaeyoon Choi Signed-off-by: Yonggil Song --- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index eddfd35eadb6..661096be59d1 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -274,7 +274,7

[f2fs-dev] [PATCH] f2fs: fix typo

2022-09-18 Thread Yonggil Song
Fix typo in f2fs.h Detected by Jaeyoon Choi Signed-off-by: Yonggil Song --- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index eddfd35eadb6..661096be59d1 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -274,7 +274,7

[f2fs-dev] [PATCH v1] f2fs: avoid victim selection from previous victim section

2022-11-02 Thread Yonggil Song
reed. In this case, when f2fs chooses a victim for the next GC round, the last segment of previous victim section is chosen as a victim. Initialize next_victim_seg[gc_type] to NULL_SEGNO for the last segment in large section. Signed-off-by: Yonggil Song --- fs/f2fs/gc.c | 5 +++-- 1 file change

[f2fs-dev] [PATCH v1] f2fs: avoid victim selection from previous victim section

2022-11-21 Thread Yonggil Song
") Signed-off-by: Yonggil Song  ---  fs/f2fs/gc.c | 5 +++--  1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 4546e01b2ee0..10677d53ef0e 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1744,8 +1744,9 @@ static int do_garbage_collect(struct f2f

Re: [f2fs-dev] (2) [PATCH v1] f2fs: avoid victim selection from previous victim section

2022-11-22 Thread Yonggil Song
Hi Chao, Thanks for your review. I'll fix this and resend a mail. Thanks >Hi Yonggil, > >I guess your email client forces converting tab and space characters of >patch, please check that. > >On 2022/11/22 10:36, Yonggil Song wrote: >> When f2fs chooses GC victim in

[f2fs-dev] [RESEND][PATCH] f2fs: avoid victim selection from previous victim section

2022-11-22 Thread Yonggil Song
") Signed-off-by: Yonggil Song --- fs/f2fs/gc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 0f967b1e98f2..f1b68eda2235 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1749,8 +1749,9 @@ static int do_garbage_collect(struct f2f

[f2fs-dev] [PATCH v1] f2fs: avoid victim selection from previous victim section

2022-11-14 Thread Yonggil Song
reed. In this case, when f2fs chooses a victim for the next GC round, the last segment of previous victim section is chosen as a victim. Initialize next_victim_seg[gc_type] to NULL_SEGNO for the last segment in large section. Signed-off-by: Yonggil Song  ---  fs/f2fs/gc.c | 5 +++--  1 file change

Re: [f2fs-dev] (2) [PATCH v1] f2fs: Fix system crash due to lack of free space in LFS

2023-03-16 Thread Yonggil Song
>On 03/14, Yonggil Song wrote: >> When f2fs tries to checkpoint during foreground gc in LFS mode, system >> crash occurs due to lack of free space if the amount of dirty node and >> dentry pages generated by data migration exceeds free space. >> The reproduc

[f2fs-dev] [PATCH v1] mkfs.f2fs: Introduce configurable reserved sections

2023-03-16 Thread Yonggil Song
higher. In other words, a user can configure more reserved segments for lower GC latency or allocate less reserved segments for lower WAF on the same number of OP segments. Signed-off-by: Yonggil Song --- include/f2fs_fs.h | 22 -- lib/libf2fs.c | 22

[f2fs-dev] [PATCH v1] f2fs: Fix system crash due to lack of free space in LFS

2023-03-14 Thread Yonggil Song
6/0x70 f2fs_balance_fs+0x16f/0x180 [f2fs] This patch adds checking whether free sections are enough before checkpoint during gc. Signed-off-by: Yonggil Song --- fs/f2fs/gc.c | 7 ++- fs/f2fs/segment.h | 26 +- 2 files changed, 27 insertions(+), 6 deletions(-) diff

[f2fs-dev] [PATCH v2] f2fs: Fix system crash due to lack of free space in LFS

2023-03-20 Thread Yonggil Song
6/0x70 f2fs_balance_fs+0x16f/0x180 [f2fs] This patch adds checking whether free sections are enough before checkpoint during gc. Signed-off-by: Yonggil Song --- fs/f2fs/gc.c | 10 -- fs/f2fs/gc.h | 2 ++ fs/f2fs/segment.h | 27 ++- 3 files changed, 32 inse

[f2fs-dev] [PATCH v1] f2fs: Fix discard bug on zoned block devices with 2MiB zone size

2023-03-13 Thread Yonggil Song
for zoned block devices when setting the discard range. This leads to invalid reset commands and write pointer mismatches. This patch fixes the zoned block device with 2MiB zone size to reset one zone at a time. Signed-off-by: Yonggil Song --- fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions

Re: [f2fs-dev] [RFC PATCH] f2fs: preserve direct write semantics when buffering is forced

2023-02-22 Thread Yonggil Song
is lower for >small writes after this patch, but this should be expected >with direct IO and in line with how f2fs behaves on top of >conventional block devices. > >Another open question is if the flushing should be done for >all cases where buffered writes are forced. > >Signed-off-by:

[f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem

2023-02-15 Thread Yonggil Song
hange the current atomic write way") Signed-off-by: Yonggil Song diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b22f49a6f128..81d326abaac1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *

[f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem

2023-02-15 Thread Yonggil Song
hange the current atomic write way") Signed-off-by: Yonggil Song diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b22f49a6f128..81d326abaac1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *

[f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem

2023-02-15 Thread Yonggil Song
hange the current atomic write way") Cc: sta...@vger.kernel.org Signed-off-by: Yonggil Song diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b22f49a6f128..81d326abaac1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *

Re: [f2fs-dev] (2) [PATCH] f2fs_io: support checkpoint command

2023-04-17 Thread Yonggil Song
On 04/17, Yonggil Song wrote: >> >Fixed a xfstests failure. >> > >> >From 400c722c2117660b83190c88e5442d63fbbffe6e Mon Sep 17 00:00:00 2001 >> >From: Jaegeuk Kim >> >Date: Mon, 10 Apr 2023 14:48:50 -0700 >> >Subject: [PATCH] f2fs: refact

Re: [f2fs-dev] [PATCH] f2fs_io: support checkpoint command

2023-04-16 Thread Yonggil Song
>Fixed a xfstests failure. > >From 400c722c2117660b83190c88e5442d63fbbffe6e Mon Sep 17 00:00:00 2001 >From: Jaegeuk Kim >Date: Mon, 10 Apr 2023 14:48:50 -0700 >Subject: [PATCH] f2fs: refactor f2fs_gc to call checkpoint in urgent condition > >The major change is to call checkpoint, if there's not

[f2fs-dev] [PATCH v2] mkfs.f2fs: Introduce configurable reserved sections

2023-04-04 Thread Yonggil Song
much higher. In other words, a user can configure more reserved segments for lower GC latency or allocate less reserved segments for lower WAF on the same number of OP segments. Signed-off-by: Yonggil Song --- include/f2fs_fs.h | 22 -- lib/libf2fs.c | 18

Re: [f2fs-dev] (2) [PATCH v1] mkfs.f2fs: Introduce configurable reserved sections

2023-03-28 Thread Yonggil Song
On 03/17, Yonggil Song wrote: >> Overview >> >> >> This option allows zoned block device users to configure GC reserved and >> overprovision area manually according to their demands on performance of >> sustained write latency and WAF. >> >

[f2fs-dev] [PATCH v1] f2fs: fix uninitialized skipped_gc_rwsem

2023-02-14 Thread Yonggil Song
oduce f2fs_gc_control to consolidate f2fs_gc parameters") Signed-off-by: Yonggil Song diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b22f49a6f128..81d326abaac1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *

Re: [f2fs-dev] (2) [PATCH v1] f2fs: fix uninitialized skipped_gc_rwsem

2023-02-15 Thread Yonggil Song
On 2023/2/15 10:48, Yonggil Song wrote: >> When f2fs skipped a gc round during victim migration, there was a bug which >> would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem >> was not initialized. It fixes the bug by correctly initializing the >>

[f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem

2023-02-15 Thread Yonggil Song
hange the current atomic write way") Signed-off-by: Yonggil Song diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b22f49a6f128..81d326abaac1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *

[f2fs-dev] [PATCH v1] f2fs: Fix over-estimating free section during FG GC

2023-05-11 Thread Yonggil Song
There was a bug that finishing FG GC unconditionally because free sections are over-estimated after checkpoint in FG GC. This patch initializes sec_freed by every checkpoint in FG GC. Signed-off-by: Yonggil Song --- fs/f2fs/gc.c | 16 +++- 1 file changed, 11 insertions(+), 5

[f2fs-dev] [PATCH v5] f2fs: New victim selection for GC

2024-01-22 Thread Yonggil Song
victim selection method in environments where the section size is relatively small. Signed-off-by: Yonggil Song --- fs/f2fs/f2fs.h | 1 + fs/f2fs/gc.c | 96 +++--- fs/f2fs/gc.h | 6 3 files changed, 82 insertions(+), 21 deletions(-) diff --git a/f

[f2fs-dev] [PATCH v6] f2fs: New victim selection for GC

2024-02-13 Thread Yonggil Song
victim selection method in environments where the section size is relatively small. Signed-off-by: Yonggil Song --- fs/f2fs/f2fs.h | 1 + fs/f2fs/gc.c | 96 +++--- fs/f2fs/gc.h | 6 3 files changed, 82 insertions(+), 21 deletions(-) diff --gi

Re: [f2fs-dev] (2) [PATCH v6] f2fs: New victim selection for GC

2024-02-20 Thread Yonggil Song
> On Tue, Feb 13, 2024 at 5:36 PM Yonggil Song wrote: > > > > > > Overview > > > > > > This patch introduces a new way to preference data sections when selecting > > GC victims. Migration of data blocks causes invalidation of node blocks. >

Re: [f2fs-dev] (2) [PATCH v2] f2fs: New victim selection for GC

2023-12-13 Thread Yonggil Song
> On 12/08, Yonggil Song wrote: > > Overview > > > > > > This patch introduces a new way to preference data sections when selecting > > GC victims. Migration of data blocks causes invalidation of node blocks. > > Therefore, in situations wher

Re: [f2fs-dev] (2) [PATCH v3] f2fs: New victim selection for GC

2023-12-26 Thread Yonggil Song
> On 12/21, Yonggil Song wrote: > > Overview > > > > > > This patch introduces a new way to preference data sections when selecting > > GC victims. Migration of data blocks causes invalidation of node blocks. > > Therefore, in situations wher

[f2fs-dev] [PATCH v3] f2fs: New victim selection for GC

2023-12-20 Thread Yonggil Song
victim selection method in environments where the section size is relatively small. Signed-off-by: Yonggil Song --- fs/f2fs/f2fs.h | 1 + fs/f2fs/gc.c | 102 +++-- fs/f2fs/gc.h | 6 +++ 3 files changed, 88 insertions(+), 21 deletions(-) diff --git a/f

Re: [f2fs-dev] (2) [PATCH v4] f2fs: New victim selection for GC

2024-01-03 Thread Yonggil Song
> On 12/28, Yonggil Song wrote: > > >From d08b97183bc830779c82b83d94f8b75ad11cb29a Mon Sep 17 00:00:00 2001 > > From: Yonggil Song > > Date: Thu, 7 Dec 2023 16:34:38 +0900 > > Subject: [PATCH v4] f2fs: New victim selection for GC > > > > Overview > &g

[f2fs-dev] [PATCH v4] f2fs: New victim selection for GC

2023-12-27 Thread Yonggil Song
>From d08b97183bc830779c82b83d94f8b75ad11cb29a Mon Sep 17 00:00:00 2001 From: Yonggil Song Date: Thu, 7 Dec 2023 16:34:38 +0900 Subject: [PATCH v4] f2fs: New victim selection for GC Overview This patch introduces a new way to preference data sections when selecting GC vict

Re: [f2fs-dev] (2) (2) [PATCH v1] f2fs: New victim selection for GC

2023-11-28 Thread Yonggil Song
On 11/20, Yonggil Song wrote: > > >Hi Yonggil, > > > > > >On 10/26, Yonggil Song wrote: > > >> Overview > > >> > > >> > > >> Introduce a new way to select the data section first when selectin

Re: [f2fs-dev] (2) [PATCH v1] f2fs: New victim selection for GC

2023-11-28 Thread Yonggil Song
>Hi Yonggil, > >On 2023/10/26 17:18, Yonggil Song wrote: >> Overview >> >> >> Introduce a new way to select the data section first when selecting a >> victim in foreground GC. This victim selection method works when the >> prefer_data_vic

[f2fs-dev] [PATCH v2] f2fs: New victim selection for GC

2023-12-08 Thread Yonggil Song
victim selection method in environments where the section size is relatively small. Signed-off-by: Yonggil Song --- fs/f2fs/f2fs.h | 1 + fs/f2fs/gc.c | 98 ++ 2 files changed, 77 insertions(+), 22 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/

Re: [f2fs-dev] (2) [PATCH v1] f2fs: New victim selection for GC

2023-11-20 Thread Yonggil Song
>Hi Yonggil, > >On 10/26, Yonggil Song wrote: >> Overview >> >> >> Introduce a new way to select the data section first when selecting a >> victim in foreground GC. This victim selection method works when the >> prefer_data_victim mount opti