Re: [PATCH v3 0/4] erofs-utils: mkfs: introduce multi-threaded compression

2024-02-28 Thread Yifan Zhao
On 2/29/24 11:12, Noboru Asai wrote: - remove inter-file compression support from this patchset Do you have any problems about inter-file compression functionarity? Or make steps (split this functionarity as separate patch set)? I'm testing v1 patch set and I have no problem like making wrong

Re: [PATCH v3 0/4] erofs-utils: mkfs: introduce multi-threaded compression

2024-02-28 Thread Noboru Asai
> - remove inter-file compression support from this patchset Do you have any problems about inter-file compression functionarity? Or make steps (split this functionarity as separate patch set)? I'm testing v1 patch set and I have no problem like making wrong images for now. (I couldn't apply v2 pa

[PATCH v4 5/5] erofs-utils: mkfs: introduce inner-file multi-threaded compression

2024-02-28 Thread Yifan Zhao
Currently, the creation of EROFS compressed image creation is single-threaded, which suffers from performance issues. This patch attempts to address it by compressing the large file in parallel. Specifically, each input file larger than 16MB is splited into segments, and each worker thread compres

[PATCH v4 4/5] erofs-utils: lib: introduce atomic operations

2024-02-28 Thread Yifan Zhao
From: Gao Xiang Add some helpers (relaxed semantics) in order to prepare for the upcoming multi-threaded support. For example, compressor may be initialized more than once in different worker threads, resulting in noisy warnings. This patch makes sure that each message will be printed only once

[PATCH v4 3/5] erofs-utils: mkfs: add --worker=# parameter

2024-02-28 Thread Yifan Zhao
This patch introduces a --worker=# parameter for the incoming multi-threaded compression support. It also introduces a segment size used in multi-threaded compression, which has the default value 16MB and cannot be modified. It also introduces a concept called `segment size` to split large files f

[PATCH v4 2/5] erofs-utils: add a helper to get available processors

2024-02-28 Thread Yifan Zhao
From: Gao Xiang In order to prepare for multi-threaded decompression. Signed-off-by: Gao Xiang --- configure.ac | 1 + include/erofs/config.h | 1 + lib/config.c | 12 3 files changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 3ccd6bb..

[PATCH v4 1/5] erofs-utils: introduce multi-threading framework

2024-02-28 Thread Yifan Zhao
Add a workqueue implementation for multi-threading support inspired by xfsprogs. Signed-off-by: Yifan Zhao Suggested-by: Gao Xiang --- configure.ac | 16 + include/erofs/internal.h | 3 + include/erofs/workqueue.h | 37 +++ lib/Makefile.am | 4 ++ lib/w

[PATCH v4 0/5] erofs-utils: mkfs: introduce multi-threaded compression

2024-02-28 Thread Yifan Zhao
changelog since v3: - remove unnecessary struct z_erofs_write_index_ctx, and add a helper z_erofs_mt_fix_index to fix extents->blkaddr before writing index - rename: z_erofs_vle_compress_ctx -> z_erofs_compressed_segment_ctx - rename: z_erofs_file_compress_ctx -> z_erofs_compressed_inode_ctx -

Re: [PATCH v3 4/4] erofs-utils: mkfs: introduce inner-file multi-threaded compression

2024-02-28 Thread Gao Xiang
On 2024/2/28 23:13, Yifan Zhao wrote: On 2/28/24 17:57, Gao Xiang wrote: On 2024/2/25 22:27, Yifan Zhao wrote: Currently, the creation of EROFS compressed image creation is single-threaded, which suffers from performance issues. This patch attempts to address it by compressing the large f

Re: [PATCH v3 4/4] erofs-utils: mkfs: introduce inner-file multi-threaded compression

2024-02-28 Thread Yifan Zhao
On 2/28/24 17:57, Gao Xiang wrote: On 2024/2/25 22:27, Yifan Zhao wrote: Currently, the creation of EROFS compressed image creation is single-threaded, which suffers from performance issues. This patch attempts to address it by compressing the large file in parallel. Specifically, each inpu

Re: [PATCH] erofs-utils: lib: introduce atomic operations

2024-02-28 Thread Gao Xiang
On 2024/2/28 21:22, Yifan Zhao wrote: On 2/28/24 16:21, Gao Xiang wrote: Add some helpers (relaxed semantics) in order to prepare for the upcoming multi-threaded support. For example, compressor may be initialized more than once in different worker threads, resulting in noisy warnings. Thi

Re: [PATCH] erofs-utils: lib: introduce atomic operations

2024-02-28 Thread Yifan Zhao
On 2/28/24 16:21, Gao Xiang wrote: Add some helpers (relaxed semantics) in order to prepare for the upcoming multi-threaded support. For example, compressor may be initialized more than once in different worker threads, resulting in noisy warnings. This patch makes sure that each message will

Re: [PATCH v3 4/4] erofs-utils: mkfs: introduce inner-file multi-threaded compression

2024-02-28 Thread Gao Xiang
On 2024/2/25 22:27, Yifan Zhao wrote: Currently, the creation of EROFS compressed image creation is single-threaded, which suffers from performance issues. This patch attempts to address it by compressing the large file in parallel. Specifically, each input file larger than 16MB is splited in

[PATCH] erofs-utils: lib: introduce atomic operations

2024-02-28 Thread Gao Xiang
Add some helpers (relaxed semantics) in order to prepare for the upcoming multi-threaded support. For example, compressor may be initialized more than once in different worker threads, resulting in noisy warnings. This patch makes sure that each message will be printed only once by adding `__warn