Commit 79b98edf authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull erofs updates from Gao Xiang:
 "In this cycle, Intel QAT hardware accelerators are supported to
  improve DEFLATE decompression performance. I've tested it with the
  enwik9 dataset of 1 MiB pclusters on our Intel Sapphire Rapids
  bare-metal server and a PL0 ESSD, and the sequential read performance
  even surpasses LZ4 software decompression on this setup.

  In addition, a `fsoffset` mount option is introduced for file-backed
  mounts to specify the filesystem offset in order to adapt customized
  container formats.

  And other improvements and minor cleanups. Summary:

   - Add a `fsoffset` mount option to specify the filesystem offset

   - Support Intel QAT accelerators to boost up the DEFLATE algorithm

   - Initialize per-CPU workers and CPU hotplug hooks lazily to avoid
     unnecessary overhead when EROFS is not mounted

   - Fix file handle encoding for 64-bit NIDs

   - Minor cleanups"

* tag 'erofs-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
  erofs: support DEFLATE decompression by using Intel QAT
  erofs: clean up erofs_{init,exit}_sysfs()
  erofs: add 'fsoffset' mount option to specify filesystem offset
  erofs: lazily initialize per-CPU workers and CPU hotplug hooks
  erofs: refine readahead tracepoint
  erofs: avoid using multiple devices with different type
  erofs: fix file handle encoding for 64-bit NIDs
parents 522544fc b4a29efc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -27,3 +27,11 @@ Description: Writing to this will drop compression-related caches,
		- 1 : invalidate cached compressed folios
		- 2 : drop in-memory pclusters
		- 3 : drop in-memory pclusters and cached compressed folios

What:		/sys/fs/erofs/accel
Date:		May 2025
Contact:	"Bo Liu" <liubo03@inspur.com>
Description:	Used to set or show hardware accelerators in effect
		and multiple accelerators are separated by '\n'.
		Supported accelerator(s): qat_deflate.
		Disable all accelerators with an empty string (echo > accel).
+1 −0
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ device=%s Specify a path to an extra device to be used together.
fsid=%s                Specify a filesystem image ID for Fscache back-end.
domain_id=%s           Specify a domain ID in fscache mode so that different images
                       with the same blobs under a given domain ID can share storage.
fsoffset=%llu          Specify block-aligned filesystem offset for the primary device.
===================    =========================================================

Sysfs Entries
+14 −0
Original line number Diff line number Diff line
@@ -144,6 +144,20 @@ config EROFS_FS_ZIP_ZSTD

	  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
+1 −0
Original line number Diff line number Diff line
@@ -7,5 +7,6 @@ erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o zutil.o
erofs-$(CONFIG_EROFS_FS_ZIP_LZMA) += decompressor_lzma.o
erofs-$(CONFIG_EROFS_FS_ZIP_DEFLATE) += decompressor_deflate.o
erofs-$(CONFIG_EROFS_FS_ZIP_ZSTD) += decompressor_zstd.o
erofs-$(CONFIG_EROFS_FS_ZIP_ACCEL) += decompressor_crypto.o
erofs-$(CONFIG_EROFS_FS_BACKED_BY_FILE) += fileio.o
erofs-$(CONFIG_EROFS_FS_ONDEMAND) += fscache.o
+10 −0
Original line number Diff line number Diff line
@@ -76,4 +76,14 @@ int z_erofs_fixup_insize(struct z_erofs_decompress_req *rq, const char *padbuf,
			 unsigned int padbufsize);
int __init z_erofs_init_decompressor(void);
void z_erofs_exit_decompressor(void);
int z_erofs_crypto_decompress(struct z_erofs_decompress_req *rq,
			      struct page **pgpl);
int z_erofs_crypto_enable_engine(const char *name, int len);
#ifdef CONFIG_EROFS_FS_ZIP_ACCEL
void z_erofs_crypto_disable_all_engines(void);
int z_erofs_crypto_show_engines(char *buf, int size, char sep);
#else
static inline void z_erofs_crypto_disable_all_engines(void) {}
static inline int z_erofs_crypto_show_engines(char *buf, int size, char sep) { return 0; }
#endif
#endif
Loading