[f2fs-dev] [PATCH v1 2/2] f2fs: introduce get_section_mtime

2024-09-10 Thread liuderong--- via Linux-f2fs-devel
From: liuderong When segs_per_sec is larger than 1, section may contain free segments, mtime should be the mean value of each valid segments, so introduce get_section_mtime to exclude free segments in a section. Signed-off-by: liuderong --- fs/f2fs/f2fs.h| 2 ++ fs/f2fs/gc.c | 15 ++-

[f2fs-dev] [PATCH v1 1/2] f2fs: remove unused parameters

2024-09-10 Thread liuderong--- via Linux-f2fs-devel
From: liuderong Remove unused parameter segno from f2fs_usable_segs_in_sec. Signed-off-by: liuderong --- fs/f2fs/f2fs.h| 3 +-- fs/f2fs/gc.c | 6 +++--- fs/f2fs/segment.c | 3 +-- fs/f2fs/segment.h | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/f2fs.h

[f2fs-dev] [PATCH v1 0/2] f2fs: modify the calculation method of mtime

2024-09-10 Thread liuderong--- via Linux-f2fs-devel
From: liuderong In cost-benefit GC algorithm, mtime will affect the selection of victim segment.For a large section, mtime should be the mean value of valid segments, in order to select correct victim segment, it needs to modify the calculation method of mtime. liuderong (2): f2fs: remove unus

Re: [f2fs-dev] [PATCH v1 2/2] f2fs: introduce get_section_mtime

2024-09-11 Thread liuderong via Linux-f2fs-devel
On 2024/9/11 18:22, Chao Yu wrote: On 2024/9/11 10:40, liuder...@oppo.com wrote: From: liuderong When segs_per_sec is larger than 1, section may contain free segments, mtime should be the mean value of each valid segments, so introduce get_section_mtime to exclude free segments in a section.

[f2fs-dev] [PATCH v2 2/2] f2fs: introduce get_section_mtime

2024-09-11 Thread liuderong--- via Linux-f2fs-devel
From: liuderong When segs_per_sec is larger than 1, section may contain free segments, mtime should be the mean value of each valid segments, so introduce get_section_mtime to exclude free segments in a section. Signed-off-by: liuderong --- fs/f2fs/f2fs.h| 2 ++ fs/f2fs/gc.c | 15 ++-

[f2fs-dev] [PATCH v2 1/2] f2fs: remove unused parameters

2024-09-11 Thread liuderong--- via Linux-f2fs-devel
From: liuderong Remove unused parameter segno from f2fs_usable_segs_in_sec. Signed-off-by: liuderong --- fs/f2fs/f2fs.h| 3 +-- fs/f2fs/gc.c | 6 +++--- fs/f2fs/segment.c | 3 +-- fs/f2fs/segment.h | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/f2fs.h

[f2fs-dev] [PATCH v2 0/2] f2fs: modify the calculation method of mtime

2024-09-11 Thread liuderong--- via Linux-f2fs-devel
From: liuderong In cost-benefit GC algorithm, mtime will affect the selection of victim segment.For a large section, mtime should be the mean value of valid segments, in order to select correct victim segment, it needs to modify the calculation method of mtime. v2: - modify new API:get_section_m

[f2fs-dev] [PATCH v3 1/2] f2fs: remove unused parameters

2024-09-18 Thread liuderong--- via Linux-f2fs-devel
From: liuderong Remove unused parameter segno from f2fs_usable_segs_in_sec. Reviewed-by: Chao Yu Signed-off-by: liuderong --- fs/f2fs/f2fs.h| 3 +-- fs/f2fs/gc.c | 6 +++--- fs/f2fs/segment.c | 3 +-- fs/f2fs/segment.h | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff

[f2fs-dev] [PATCH v3 0/2] f2fs: modify the calculation method of mtime

2024-09-18 Thread liuderong--- via Linux-f2fs-devel
From: liuderong In cost-benefit GC algorithm, mtime will affect the selection of victim segment.For a large section, mtime should be the mean value of valid blocks, in order to select correct victim segment, it needs to modify the calculation method of mtime. v3: - add new define INVALID_MTIME a

[f2fs-dev] [PATCH v3 2/2] f2fs: introduce f2fs_get_section_mtime

2024-09-18 Thread liuderong--- via Linux-f2fs-devel
From: liuderong When segs_per_sec is larger than 1, section may contain invalid segments, mtime should be the average value of each valid blocks, so introduce f2fs_get_section_mtime to record the average mtime of all valid blocks in a section. Signed-off-by: liuderong --- fs/f2fs/f2fs.h|