mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-11 04:50:23 -04:00
This patch introduces the use of the Intel QAT to offload EROFS data
decompression, aiming to improve the decompression performance.
A 285MiB dataset is used with the following command to create EROFS
images with different cluster sizes:
$ mkfs.erofs -zdeflate,level=9 -C{4096,16384,65536,131072,262144}
Fio is used to test the following read patterns:
$ fio -filename=testfile -bs=4k -rw=read -name=job1
$ fio -filename=testfile -bs=4k -rw=randread -name=job1
$ fio -filename=testfile -bs=4k -rw=randread --io_size=14m -name=job1
Here are some performance numbers for reference:
Processors: Intel(R) Xeon(R) 6766E (144 cores)
Memory: 512 GiB
|-----------------------------------------------------------------------------|
| | Cluster size | sequential read | randread | small randread(5%) |
|-----------|--------------|-----------------|-----------|--------------------|
| Intel QAT | 4096 | 538 MiB/s | 112 MiB/s | 20.76 MiB/s |
| Intel QAT | 16384 | 699 MiB/s | 158 MiB/s | 21.02 MiB/s |
| Intel QAT | 65536 | 917 MiB/s | 278 MiB/s | 20.90 MiB/s |
| Intel QAT | 131072 | 1056 MiB/s | 351 MiB/s | 23.36 MiB/s |
| Intel QAT | 262144 | 1145 MiB/s | 431 MiB/s | 26.66 MiB/s |
| deflate | 4096 | 499 MiB/s | 108 MiB/s | 21.50 MiB/s |
| deflate | 16384 | 422 MiB/s | 125 MiB/s | 18.94 MiB/s |
| deflate | 65536 | 452 MiB/s | 159 MiB/s | 13.02 MiB/s |
| deflate | 131072 | 452 MiB/s | 177 MiB/s | 11.44 MiB/s |
| deflate | 262144 | 466 MiB/s | 194 MiB/s | 10.60 MiB/s |
Signed-off-by: Bo Liu <liubo03@inspur.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250522094931.28956-1-liubo03@inspur.com
[ Gao Xiang: refine the commit message. ]
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
195 lines
6.2 KiB
Plaintext
195 lines
6.2 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
config EROFS_FS
|
|
tristate "EROFS filesystem support"
|
|
depends on BLOCK
|
|
select CRC32
|
|
select FS_IOMAP
|
|
help
|
|
EROFS (Enhanced Read-Only File System) is a lightweight read-only
|
|
file system with modern designs (e.g. no buffer heads, inline
|
|
xattrs/data, chunk-based deduplication, multiple devices, etc.) for
|
|
scenarios which need high-performance read-only solutions, e.g.
|
|
smartphones with Android OS, LiveCDs and high-density hosts with
|
|
numerous containers;
|
|
|
|
It also provides transparent compression and deduplication support to
|
|
improve storage density and maintain relatively high compression
|
|
ratios, and it implements in-place decompression to temporarily reuse
|
|
page cache for compressed data using proper strategies, which is
|
|
quite useful for ensuring guaranteed end-to-end runtime decompression
|
|
performance under extreme memory pressure without extra cost.
|
|
|
|
See the documentation at <file:Documentation/filesystems/erofs.rst>
|
|
and the web pages at <https://erofs.docs.kernel.org> for more details.
|
|
|
|
If unsure, say N.
|
|
|
|
config EROFS_FS_DEBUG
|
|
bool "EROFS debugging feature"
|
|
depends on EROFS_FS
|
|
help
|
|
Print debugging messages and enable more BUG_ONs which check
|
|
filesystem consistency and find potential issues aggressively,
|
|
which can be used for Android eng build, for example.
|
|
|
|
For daily use, say N.
|
|
|
|
config EROFS_FS_XATTR
|
|
bool "EROFS extended attributes"
|
|
depends on EROFS_FS
|
|
select XXHASH
|
|
default y
|
|
help
|
|
Extended attributes are name:value pairs associated with inodes by
|
|
the kernel or by users (see the attr(5) manual page, or visit
|
|
<http://acl.bestbits.at/> for details).
|
|
|
|
If unsure, say N.
|
|
|
|
config EROFS_FS_POSIX_ACL
|
|
bool "EROFS Access Control Lists"
|
|
depends on EROFS_FS_XATTR
|
|
select FS_POSIX_ACL
|
|
default y
|
|
help
|
|
Posix Access Control Lists (ACLs) support permissions for users and
|
|
groups beyond the owner/group/world scheme.
|
|
|
|
To learn more about Access Control Lists, visit the POSIX ACLs for
|
|
Linux website <http://acl.bestbits.at/>.
|
|
|
|
If you don't know what Access Control Lists are, say N.
|
|
|
|
config EROFS_FS_SECURITY
|
|
bool "EROFS Security Labels"
|
|
depends on EROFS_FS_XATTR
|
|
default y
|
|
help
|
|
Security labels provide an access control facility to support Linux
|
|
Security Models (LSMs) accepted by AppArmor, SELinux, Smack and TOMOYO
|
|
Linux. This option enables an extended attribute handler for file
|
|
security labels in the erofs filesystem, so that it requires enabling
|
|
the extended attribute support in advance.
|
|
|
|
If you are not using a security module, say N.
|
|
|
|
config EROFS_FS_BACKED_BY_FILE
|
|
bool "File-backed EROFS filesystem support"
|
|
depends on EROFS_FS
|
|
default y
|
|
help
|
|
This allows EROFS to use filesystem image files directly, without
|
|
the intercession of loopback block devices or likewise. It is
|
|
particularly useful for container images with numerous blobs and
|
|
other sandboxes, where loop devices behave intricately. It can also
|
|
be used to simplify error-prone lifetime management of unnecessary
|
|
virtual block devices.
|
|
|
|
Note that this feature, along with ongoing fanotify pre-content
|
|
hooks, will eventually replace "EROFS over fscache."
|
|
|
|
If you don't want to enable this feature, say N.
|
|
|
|
config EROFS_FS_ZIP
|
|
bool "EROFS Data Compression Support"
|
|
depends on EROFS_FS
|
|
select LZ4_DECOMPRESS
|
|
default y
|
|
help
|
|
Enable transparent compression support for EROFS file systems.
|
|
|
|
If you don't want to enable compression feature, say N.
|
|
|
|
config EROFS_FS_ZIP_LZMA
|
|
bool "EROFS LZMA compressed data support"
|
|
depends on EROFS_FS_ZIP
|
|
select XZ_DEC
|
|
select XZ_DEC_MICROLZMA
|
|
help
|
|
Saying Y here includes support for reading EROFS file systems
|
|
containing LZMA compressed data, specifically called microLZMA. It
|
|
gives better compression ratios than the default LZ4 format, at the
|
|
expense of more CPU overhead.
|
|
|
|
If unsure, say N.
|
|
|
|
config EROFS_FS_ZIP_DEFLATE
|
|
bool "EROFS DEFLATE compressed data support"
|
|
depends on EROFS_FS_ZIP
|
|
select ZLIB_INFLATE
|
|
help
|
|
Saying Y here includes support for reading EROFS file systems
|
|
containing DEFLATE compressed data. It gives better compression
|
|
ratios than the default LZ4 format, while it costs more CPU
|
|
overhead.
|
|
|
|
DEFLATE support is an experimental feature for now and so most
|
|
file systems will be readable without selecting this option.
|
|
|
|
If unsure, say N.
|
|
|
|
config EROFS_FS_ZIP_ZSTD
|
|
bool "EROFS Zstandard compressed data support"
|
|
depends on EROFS_FS_ZIP
|
|
select ZSTD_DECOMPRESS
|
|
help
|
|
Saying Y here includes support for reading EROFS file systems
|
|
containing Zstandard compressed data. It gives better compression
|
|
ratios than the default LZ4 format, while it costs more CPU
|
|
overhead.
|
|
|
|
Zstandard support is an experimental feature for now and so most
|
|
file systems will be readable without selecting this option.
|
|
|
|
If unsure, say N.
|
|
|
|
config EROFS_FS_ZIP_ACCEL
|
|
bool "EROFS hardware decompression support"
|
|
depends on EROFS_FS_ZIP
|
|
help
|
|
Saying Y here includes hardware accelerator support for reading
|
|
EROFS file systems containing compressed data. It gives better
|
|
decompression speed than the software-implemented decompression, and
|
|
it costs lower CPU overhead.
|
|
|
|
Hardware accelerator support is an experimental feature for now and
|
|
file systems are still readable without selecting this option.
|
|
|
|
If unsure, say N.
|
|
|
|
config EROFS_FS_ONDEMAND
|
|
bool "EROFS fscache-based on-demand read support (deprecated)"
|
|
depends on EROFS_FS
|
|
select NETFS_SUPPORT
|
|
select FSCACHE
|
|
select CACHEFILES
|
|
select CACHEFILES_ONDEMAND
|
|
help
|
|
This permits EROFS to use fscache-backed data blobs with on-demand
|
|
read support.
|
|
|
|
It is now deprecated and scheduled to be removed from the kernel
|
|
after fanotify pre-content hooks are landed.
|
|
|
|
If unsure, say N.
|
|
|
|
config EROFS_FS_PCPU_KTHREAD
|
|
bool "EROFS per-cpu decompression kthread workers"
|
|
depends on EROFS_FS_ZIP
|
|
help
|
|
Saying Y here enables per-CPU kthread workers pool to carry out
|
|
async decompression for low latencies on some architectures.
|
|
|
|
If unsure, say N.
|
|
|
|
config EROFS_FS_PCPU_KTHREAD_HIPRI
|
|
bool "EROFS high priority per-CPU kthread workers"
|
|
depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD
|
|
default y
|
|
help
|
|
This permits EROFS to configure per-CPU kthread workers to run
|
|
at higher priority.
|
|
|
|
If unsure, say N.
|