Skip to content

os/mkosi: read squashfs file data in parallel - #1506

Merged
kvinwang merged 2 commits into
nextfrom
squashfs-parallel-read
Oct 30, 2026
Merged

kvinwang merged 2 commits into
nextfrom
squashfs-parallel-read

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Fixes #1505.

With SQUASHFS_FILE_CACHE and the single decompressor, squashfs copies file data through a per-mount cache with one entry per decompressor (so one), serializing every data block read of a mount, uncompressed blocks included. This capped verity volumes at ~700 MB/s on a B300 host where the raw disk reads at 4.6 GB/s.

Switch the guest kernel to SQUASHFS_FILE_DIRECT (decompress straight into the page cache) and per-CPU decompressors.

Checked on linux 6.18.40: x86_64_defconfig + kernel.config + olddefconfig yields FILE_DIRECT=y, FILE_CACHE unset, COMPILE_DECOMP_MULTI_PERCPU=y, and check-kernel-config.sh passes.

With CONFIG_SQUASHFS_FILE_CACHE and the single decompressor, squashfs
copies file data through a per-mount cache sized to the decompressor
count, i.e. one entry, so every data block read of a mount serializes,
even for uncompressed blocks. Verity volumes are squashfs, and on a B300
host one topped out at ~700 MB/s while the raw disk read at 4.6 GB/s.

Decompress directly into the page cache and use per-CPU decompressors.

Fixes #1505

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang merged commit 89b09b8 into next Oct 30, 2026
9 checks passed
@kvinwang
kvinwang deleted the squashfs-parallel-read branch October 30, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guest kernel: squashfs single-decompressor caps verity volume reads at ~700 MB/s

1 participant