Repository navigation
os/mkosi: read squashfs file data in parallel - #1506
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1505.
With
SQUASHFS_FILE_CACHEand 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+olddefconfigyieldsFILE_DIRECT=y,FILE_CACHEunset,COMPILE_DECOMP_MULTI_PERCPU=y, andcheck-kernel-config.shpasses.