Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-22 Thread Chao Yu
On 2021/9/21 6:57, Jaegeuk Kim wrote: On 09/12, Chao Yu wrote: On 2021/9/11 7:13, Jaegeuk Kim wrote: Wait. Why do we need to add so many options here? I was expecting to see performance difference when getting random segments or random blocks as an extreme case. I don't get the point why we nee

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-20 Thread Jaegeuk Kim
On 09/12, Chao Yu wrote: > On 2021/9/11 7:13, Jaegeuk Kim wrote: > > Wait. Why do we need to add so many options here? I was expecting to see > > performance difference when getting random segments or random blocks as > > an extreme case. I don't get the point why we need the middle of those > > c

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-11 Thread Chao Yu
On 2021/9/11 7:13, Jaegeuk Kim wrote: Wait. Why do we need to add so many options here? I was expecting to see performance difference when getting random segments or random blocks as an extreme case. I don't get the point why we need the middle of those cases. I guess we can simply the aging te

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-11 Thread Chao Yu
On 2021/9/10 23:24, Daeho Jeong wrote: On Fri, Sep 10, 2021 at 7:34 AM Daeho Jeong wrote: On Thu, Sep 9, 2021 at 4:50 PM Chao Yu wrote: On 2021/9/8 2:12, Daeho Jeong wrote: On Fri, Sep 3, 2021 at 11:45 PM Chao Yu wrote: On 2021/9/4 12:40, Daeho Jeong wrote: As a per curseg field. May

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-10 Thread Jaegeuk Kim
On 09/02, Daeho Jeong wrote: > From: Daeho Jeong > > Added three options into "mode=" mount option to make it possible for > developers to make the filesystem fragmented or simulate filesystem > fragmentation/after-GC situation itself. The developers use these modes > to understand filesystem fra

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-10 Thread Daeho Jeong
On Fri, Sep 10, 2021 at 7:34 AM Daeho Jeong wrote: > > On Thu, Sep 9, 2021 at 4:50 PM Chao Yu wrote: > > > > On 2021/9/8 2:12, Daeho Jeong wrote: > > > On Fri, Sep 3, 2021 at 11:45 PM Chao Yu wrote: > > >> > > >> On 2021/9/4 12:40, Daeho Jeong wrote: > > As a per curseg field. > > > >

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-10 Thread Daeho Jeong
On Thu, Sep 9, 2021 at 4:50 PM Chao Yu wrote: > > On 2021/9/8 2:12, Daeho Jeong wrote: > > On Fri, Sep 3, 2021 at 11:45 PM Chao Yu wrote: > >> > >> On 2021/9/4 12:40, Daeho Jeong wrote: > As a per curseg field. > > > Maybe, we run into the same race condition issue you told before f

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-09 Thread Chao Yu
On 2021/9/8 2:12, Daeho Jeong wrote: On Fri, Sep 3, 2021 at 11:45 PM Chao Yu wrote: On 2021/9/4 12:40, Daeho Jeong wrote: As a per curseg field. Maybe, we run into the same race condition issue you told before for fragment_remained_chunk. Could you clarify this more? e.g. F2FS_OPTION(sbi

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-07 Thread Daeho Jeong
On Fri, Sep 3, 2021 at 11:45 PM Chao Yu wrote: > > On 2021/9/4 12:40, Daeho Jeong wrote: > >> As a per curseg field. > >> > >>> Maybe, we run into the same race condition issue you told before for > >>> fragment_remained_chunk. > >>> Could you clarify this more? > >> > >> e.g. > >> > >> F2FS_OPTIO

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-03 Thread Chao Yu
On 2021/9/4 12:40, Daeho Jeong wrote: As a per curseg field. Maybe, we run into the same race condition issue you told before for fragment_remained_chunk. Could you clarify this more? e.g. F2FS_OPTION(sbi).fs_mode = FS_MODE_FRAGMENT_FIXED_BLK fragment_chunk_size = 384 fragment_hole_size = 38

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-03 Thread Daeho Jeong
> As a per curseg field. > > > Maybe, we run into the same race condition issue you told before for > > fragment_remained_chunk. > > Could you clarify this more? > > e.g. > > F2FS_OPTION(sbi).fs_mode = FS_MODE_FRAGMENT_FIXED_BLK > fragment_chunk_size = 384 > fragment_hole_size = 384 > > When creati

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-03 Thread Chao Yu
On 2021/9/4 4:33, Daeho Jeong wrote: if (f2fs_need_seq_seg(sbi)) return 0; static inline bool f2fs_need_seq_seg(struct f2fs_sb_info *sbi) { return F2FS_OPTION(sbi).fs_mode == FS_MODE_FRAGMENT_FIXED_BLK; } Do you need this in select_policy(), either? IMO, f

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-03 Thread Daeho Jeong
> if (f2fs_need_seq_seg(sbi)) > return 0; > > static inline bool f2fs_need_seq_seg(struct f2fs_sb_info *sbi) > { > return F2FS_OPTION(sbi).fs_mode == FS_MODE_FRAGMENT_FIXED_BLK; > } > Do you need this in select_policy(), either? Like, if (f2fs_need_rand_seg(

Re: [f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-02 Thread Chao Yu
On 2021/9/3 1:24, Daeho Jeong wrote: @@ -2630,6 +2631,8 @@ static unsigned int __get_next_segno(struct f2fs_sb_info *sbi, int type) unsigned short seg_type = curseg->seg_type; sanity_check_seg_type(sbi, seg_type); + if (f2fs_need_rand_seg(sbi)) + return prandom

[f2fs-dev] [PATCH v4] f2fs: introduce fragment allocation mode mount option

2021-09-02 Thread Daeho Jeong
From: Daeho Jeong Added three options into "mode=" mount option to make it possible for developers to make the filesystem fragmented or simulate filesystem fragmentation/after-GC situation itself. The developers use these modes to understand filesystem fragmentation/after-GC condition well, and e