From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Nithurshen <nithurshen.dev@gmail.com>
Cc: linux-erofs@lists.ozlabs.org, xiang@kernel.org
Subject: Re: [PATCH 1/2 v3] fsck.erofs: add multi-threaded decompression
Date: Wed, 8 Jul 2026 10:31:10 +0800 [thread overview]
Message-ID: <8e8871ed-5d29-4875-a86e-b86b18467481@linux.alibaba.com> (raw)
In-Reply-To: <20260706061048.16349-1-nithurshen.dev@gmail.com>
On 2026/7/6 14:10, Nithurshen wrote:
> Hi Xiang,
>
> Please find the updated multi-threaded decompression implementation for
> fsck.erofs. This version introduces an algorithm-aware asynchronous
> worker pool, dynamically sized based on system CPUs, to significantly
> accelerate the extraction of computationally expensive images.
>
> Benchmarks were performed on an ARM64 environment, extracting the 8.2 GB
> Linux repository downloaded from Github.
>
> Extraction Time (Seconds):
>
> | Algorithm | 4k | 8k | 16k | 32k | 64k |
> | --- | --- | --- | --- | --- | --- |
> | lz4hc(MT) | 9.36 | 8.31 | 8.27 | 8.54 | 6.94 |
> | lz4hc(ST) | 4.40 | 5.77 | 3.65 | 5.45 | 3.36 |
> | zstd(MT) | 9.26 | 8.68 | 8.89 | 8.11 | 7.94 |
> | zstd(ST) | 5.23 | 4.52 | 4.62 | 4.11 | 4.02 |
> | lzma(MT) | 23.72 | 24.79 | 25.90 | 26.92 | 27.77 |
> | lzma(ST) | 56.37 | 65.06 | 71.07 | 74.69 | 81.63 |
>
> Performance Analysis:
> The implementation provides a significant speedup for LZMA (up to 2.9x)
> as the heavy decompression workload effectively amortizes the thread
> synchronization overhead.
>
> However, for fast algorithms like LZ4 and ZSTD, the current MT overhead
> (futex contention and scheduling) leads to slower performance compared
> to the synchronous baseline.
>
> I have tried various batch sizes for fast algorithms, but the time did
> not improve. (I tried from 32 to 256 batch sizes)
>
> Can we fall back to synchronous extraction here?
Sorry for delay.
We cannot, that is why we need to find a proper way to batch
the pclusters and reschedule.
And that is why I asked you to benchmark each commit.
Thanks,
Gao Xiang
>
> Verification:
>
> * Deadlocks/Race Conditions: Verified via GDB backtrace analysis and
> stress testing.
> * Memory Leaks: Verified via rigorous buffer ownership tracking and
> ensuring all task resources are cleaned up upon worker completion.
> * Integrity: All configurations passed bit-for-bit integrity checks
> between the extracted and original directory for all algorithms and
> chunk sizes.
>
> All concurrency primitives and memory paths have been verified to the
> best of my knowledge.
>
> Thanks,
> Nithurshen
next prev parent reply other threads:[~2026-07-08 2:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-21 12:01 [PATCH 0/2] fsck.erofs: implement multi-threaded extraction Nithurshen
2026-06-21 12:01 ` [PATCH 1/2] fsck.erofs: add multi-threaded decompression Nithurshen
2026-06-22 2:08 ` Gao Xiang
2026-06-29 9:55 ` [PATCH 1/2 v2] " Nithurshen
2026-07-05 14:00 ` Gao Xiang
2026-07-06 6:05 ` [PATCH 1/2 v3] " Nithurshen
2026-07-06 6:10 ` Nithurshen
2026-07-08 2:31 ` Gao Xiang [this message]
2026-07-13 7:02 ` [PATCH 1/2 v4] " Nithurshen
2026-06-21 12:01 ` [PATCH 2/2] fsck.erofs: implement concurrent directory traversal Nithurshen
2026-07-05 14:05 ` Gao Xiang
2026-07-14 1:10 ` [PATCH v5] fsck.erofs: add multi-threaded decompression Nithurshen
2026-07-14 1:18 ` Nithurshen Karthikeyan
2026-07-26 11:01 ` [PATCH v6] " Nithurshen
2026-07-26 11:02 ` Nithurshen
2026-07-24 14:35 ` [PATCH v2 2/2] fsck.erofs: implement concurrent directory traversal Nithurshen
2026-07-24 14:47 ` Nithurshen
2026-07-24 15:28 ` Gao Xiang
2026-07-24 15:32 ` Nithurshen Karthikeyan
2026-07-24 15:45 ` Gao Xiang
2026-07-24 15:53 ` Gao Xiang
2026-07-25 1:26 ` [PATCH v3 " Nithurshen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8e8871ed-5d29-4875-a86e-b86b18467481@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=nithurshen.dev@gmail.com \
--cc=xiang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).