[PATCH 1/6] erofs: convert z_erofs_onlinepage_.* to folios

2024-03-05 Thread Gao Xiang
Online folios are locked file-backed folios which will eventually keep decoded (e.g. decompressed) data of each inode for end users to utilize. It may belong to a few pclusters and contain other data (e.g. compressed data for inplace I/Os) temporarily in a time-sharing manner to reduce memory foot

[PATCH 5/6] erofs: convert z_erofs_submissionqueue_endio() to folios

2024-03-05 Thread Gao Xiang
Use bio_for_each_folio() to iterate over each folio in the bio and there is no large folios for now. Signed-off-by: Gao Xiang --- fs/erofs/zdata.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index d78cc54a96f5..

[PATCH 2/6] erofs: convert z_erofs_do_read_page() to folios

2024-03-05 Thread Gao Xiang
It is a straight-forward conversion. Besides, it's renamed as z_erofs_scan_folio(). Signed-off-by: Gao Xiang --- fs/erofs/zdata.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 5013fcd4965a..c2507465

[PATCH 4/6] erofs: convert z_erofs_fill_bio_vec() to folios

2024-03-05 Thread Gao Xiang
Introduce a folio member to `struct z_erofs_bvec` and convert most of z_erofs_fill_bio_vec() to folios, which is still straight-forward. Signed-off-by: Gao Xiang --- fs/erofs/zdata.c | 71 1 file changed, 36 insertions(+), 35 deletions(-) diff --

[PATCH 3/6] erofs: get rid of `justfound` debugging tag

2024-03-05 Thread Gao Xiang
`justfound` is introduced to identify cached folios that are just added to compressed bvecs so that more checks can be applied in the I/O submission path. EROFS is quite now stable compared to the codebase at that stage. `justfound` becomes a burden for upcoming features. Drop it. Signed-off-by:

[PATCH 6/6] erofs: refine managed cache operations to folios

2024-03-05 Thread Gao Xiang
Convert erofs_try_to_free_all_cached_pages() and z_erofs_cache_release_folio(). Besides, erofs_page_is_managed() is moved to zdata.c and renamed as erofs_folio_is_managed(). Signed-off-by: Gao Xiang --- fs/erofs/compress.h | 7 fs/erofs/decompressor_deflate.c | 3 -- fs/erofs

[xiang-erofs:dev-test] BUILD SUCCESS 5ff6ddfc717fa30dcdaf3c342725bc58d782d2c8

2024-03-05 Thread kernel test robot
-20240305 gcc arc randconfig-002-20240305 gcc arc tb10x_defconfig gcc arcvdk_hs38_defconfig gcc arm allmodconfig gcc arm allnoconfig clang arm

[PATCH] erofs: apply proper VMA alignment for memory mapped files on THP

2024-03-05 Thread Gao Xiang
There are mainly two reasons that thp_get_unmapped_area() should be used for EROFS as other filesystems: - It's needed to enable PMD mappings as a FSDAX filesystem, see commit 74d2fad1334d ("thp, dax: add thp_get_unmapped_area for pmd mappings"); - It's useful together with CONFIG_READ_ON

Re: [PATCH] erofs: apply proper VMA alignment for memory mapped files on THP

2024-03-05 Thread Gao Xiang
On 2024/3/6 13:31, Gao Xiang wrote: There are mainly two reasons that thp_get_unmapped_area() should be used for EROFS as other filesystems: - It's needed to enable PMD mappings as a FSDAX filesystem, see commit 74d2fad1334d ("thp, dax: add thp_get_unmapped_area for pmd mappings");

Re: [PATCH] erofs: apply proper VMA alignment for memory mapped files on THP

2024-03-05 Thread Jingbo Xu
On 3/6/24 2:51 PM, Gao Xiang wrote: > > > On 2024/3/6 13:31, Gao Xiang wrote: >> There are mainly two reasons that thp_get_unmapped_area() should be >> used for EROFS as other filesystems: >> >>   - It's needed to enable PMD mappings as a FSDAX filesystem, see >>     commit 74d2fad1334d ("thp,