1*ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 222635ec9SAlexey Dobriyanconfig SQUASHFS 322635ec9SAlexey Dobriyan tristate "SquashFS 4.0 - Squashed file system support" 422635ec9SAlexey Dobriyan depends on BLOCK 522635ec9SAlexey Dobriyan help 622635ec9SAlexey Dobriyan Saying Y here includes support for SquashFS 4.0 (a Compressed 722635ec9SAlexey Dobriyan Read-Only File System). Squashfs is a highly compressed read-only 8681ffe2eSPhillip Lougher filesystem for Linux. It uses zlib, lzo or xz compression to 9681ffe2eSPhillip Lougher compress both files, inodes and directories. Inodes in the system 10681ffe2eSPhillip Lougher are very small and all blocks are packed to minimise data overhead. 11681ffe2eSPhillip Lougher Block sizes greater than 4K are supported up to a maximum of 1 Mbytes 12681ffe2eSPhillip Lougher (default block size 128K). SquashFS 4.0 supports 64 bit filesystems 13681ffe2eSPhillip Lougher and files (larger than 4GB), full uid/gid information, hard links and 1422635ec9SAlexey Dobriyan timestamps. 1522635ec9SAlexey Dobriyan 1622635ec9SAlexey Dobriyan Squashfs is intended for general read-only filesystem use, for 1722635ec9SAlexey Dobriyan archival use (i.e. in cases where a .tar.gz file may be used), and in 1822635ec9SAlexey Dobriyan embedded systems where low overhead is needed. Further information 1922635ec9SAlexey Dobriyan and tools are available from http://squashfs.sourceforge.net. 2022635ec9SAlexey Dobriyan 2122635ec9SAlexey Dobriyan If you want to compile this as a module ( = code which can be 2222635ec9SAlexey Dobriyan inserted in and removed from the running kernel whenever you want), 23395cf969SPaul Bolle say M here. The module will be called squashfs. Note that the root 24395cf969SPaul Bolle file system (the one containing the directory /) cannot be compiled 25395cf969SPaul Bolle as a module. 2622635ec9SAlexey Dobriyan 2722635ec9SAlexey Dobriyan If unsure, say N. 2822635ec9SAlexey Dobriyan 29d208383dSPhillip Lougherchoice 300d455c12SPhillip Lougher prompt "File decompression options" 310d455c12SPhillip Lougher depends on SQUASHFS 320d455c12SPhillip Lougher help 330d455c12SPhillip Lougher Squashfs now supports two options for decompressing file 340d455c12SPhillip Lougher data. Traditionally Squashfs has decompressed into an 350d455c12SPhillip Lougher intermediate buffer and then memcopied it into the page cache. 360d455c12SPhillip Lougher Squashfs now supports the ability to decompress directly into 370d455c12SPhillip Lougher the page cache. 380d455c12SPhillip Lougher 390d455c12SPhillip Lougher If unsure, select "Decompress file data into an intermediate buffer" 400d455c12SPhillip Lougher 410d455c12SPhillip Lougherconfig SQUASHFS_FILE_CACHE 420d455c12SPhillip Lougher bool "Decompress file data into an intermediate buffer" 430d455c12SPhillip Lougher help 440d455c12SPhillip Lougher Decompress file data into an intermediate buffer and then 450d455c12SPhillip Lougher memcopy it into the page cache. 460d455c12SPhillip Lougher 470d455c12SPhillip Lougherconfig SQUASHFS_FILE_DIRECT 480d455c12SPhillip Lougher bool "Decompress files directly into the page cache" 490d455c12SPhillip Lougher help 500d455c12SPhillip Lougher Directly decompress file data into the page cache. 510d455c12SPhillip Lougher Doing so can significantly improve performance because 520d455c12SPhillip Lougher it eliminates a memcpy and it also removes the lock contention 530d455c12SPhillip Lougher on the single buffer. 540d455c12SPhillip Lougher 550d455c12SPhillip Lougherendchoice 560d455c12SPhillip Lougher 570d455c12SPhillip Lougherchoice 58d208383dSPhillip Lougher prompt "Decompressor parallelisation options" 59d208383dSPhillip Lougher depends on SQUASHFS 60d208383dSPhillip Lougher help 61d208383dSPhillip Lougher Squashfs now supports three parallelisation options for 62d208383dSPhillip Lougher decompression. Each one exhibits various trade-offs between 63d208383dSPhillip Lougher decompression performance and CPU and memory usage. 64d208383dSPhillip Lougher 65d208383dSPhillip Lougher If in doubt, select "Single threaded compression" 66d208383dSPhillip Lougher 67d208383dSPhillip Lougherconfig SQUASHFS_DECOMP_SINGLE 68d208383dSPhillip Lougher bool "Single threaded compression" 69d208383dSPhillip Lougher help 70d208383dSPhillip Lougher Traditionally Squashfs has used single-threaded decompression. 71d208383dSPhillip Lougher Only one block (data or metadata) can be decompressed at any 72d208383dSPhillip Lougher one time. This limits CPU and memory usage to a minimum. 73d208383dSPhillip Lougher 74d208383dSPhillip Lougherconfig SQUASHFS_DECOMP_MULTI 75d208383dSPhillip Lougher bool "Use multiple decompressors for parallel I/O" 76d208383dSPhillip Lougher help 77d208383dSPhillip Lougher By default Squashfs uses a single decompressor but it gives 78d208383dSPhillip Lougher poor performance on parallel I/O workloads when using multiple CPU 79d208383dSPhillip Lougher machines due to waiting on decompressor availability. 80d208383dSPhillip Lougher 81d208383dSPhillip Lougher If you have a parallel I/O workload and your system has enough memory, 82d208383dSPhillip Lougher using this option may improve overall I/O performance. 83d208383dSPhillip Lougher 84d208383dSPhillip Lougher This decompressor implementation uses up to two parallel 85d208383dSPhillip Lougher decompressors per core. It dynamically allocates decompressors 86d208383dSPhillip Lougher on a demand basis. 87d208383dSPhillip Lougher 88d208383dSPhillip Lougherconfig SQUASHFS_DECOMP_MULTI_PERCPU 89d208383dSPhillip Lougher bool "Use percpu multiple decompressors for parallel I/O" 90d208383dSPhillip Lougher help 91d208383dSPhillip Lougher By default Squashfs uses a single decompressor but it gives 92d208383dSPhillip Lougher poor performance on parallel I/O workloads when using multiple CPU 93d208383dSPhillip Lougher machines due to waiting on decompressor availability. 94d208383dSPhillip Lougher 95d208383dSPhillip Lougher This decompressor implementation uses a maximum of one 96d208383dSPhillip Lougher decompressor per core. It uses percpu variables to ensure 97d208383dSPhillip Lougher decompression is load-balanced across the cores. 98d208383dSPhillip Lougher 99d208383dSPhillip Lougherendchoice 100d208383dSPhillip Lougher 101637d5c9aSPhillip Lougherconfig SQUASHFS_XATTR 10201e5b4e4SPhillip Lougher bool "Squashfs XATTR support" 10301e5b4e4SPhillip Lougher depends on SQUASHFS 10401e5b4e4SPhillip Lougher help 10501e5b4e4SPhillip Lougher Saying Y here includes support for extended attributes (xattrs). 10601e5b4e4SPhillip Lougher Xattrs are name:value pairs associated with inodes by 10701e5b4e4SPhillip Lougher the kernel or by users (see the attr(5) manual page). 10801e5b4e4SPhillip Lougher 10901e5b4e4SPhillip Lougher If unsure, say N. 11001e5b4e4SPhillip Lougher 111cc6d3497SPhillip Lougherconfig SQUASHFS_ZLIB 112cc6d3497SPhillip Lougher bool "Include support for ZLIB compressed file systems" 113cc6d3497SPhillip Lougher depends on SQUASHFS 114cc6d3497SPhillip Lougher select ZLIB_INFLATE 115cc6d3497SPhillip Lougher default y 116cc6d3497SPhillip Lougher help 117cc6d3497SPhillip Lougher ZLIB compression is the standard compression used by Squashfs 118cc6d3497SPhillip Lougher file systems. It offers a good trade-off between compression 119cc6d3497SPhillip Lougher achieved and the amount of CPU time and memory necessary to 120cc6d3497SPhillip Lougher compress and decompress. 121cc6d3497SPhillip Lougher 122cc6d3497SPhillip Lougher If unsure, say Y. 123cc6d3497SPhillip Lougher 12462421645SPhillip Lougherconfig SQUASHFS_LZ4 12562421645SPhillip Lougher bool "Include support for LZ4 compressed file systems" 12662421645SPhillip Lougher depends on SQUASHFS 12762421645SPhillip Lougher select LZ4_DECOMPRESS 12862421645SPhillip Lougher help 12962421645SPhillip Lougher Saying Y here includes support for reading Squashfs file systems 13062421645SPhillip Lougher compressed with LZ4 compression. LZ4 compression is mainly 13162421645SPhillip Lougher aimed at embedded systems with slower CPUs where the overheads 13262421645SPhillip Lougher of zlib are too high. 13362421645SPhillip Lougher 13462421645SPhillip Lougher LZ4 is not the standard compression used in Squashfs and so most 13562421645SPhillip Lougher file systems will be readable without selecting this option. 13662421645SPhillip Lougher 13762421645SPhillip Lougher If unsure, say N. 13862421645SPhillip Lougher 13979cb8cedSChan Jeongconfig SQUASHFS_LZO 14079cb8cedSChan Jeong bool "Include support for LZO compressed file systems" 14179cb8cedSChan Jeong depends on SQUASHFS 14279cb8cedSChan Jeong select LZO_DECOMPRESS 1434b676d2dSPhillip Lougher help 1444b676d2dSPhillip Lougher Saying Y here includes support for reading Squashfs file systems 14570f23fd6SJustin P. Mattock compressed with LZO compression. LZO compression is mainly 1464b676d2dSPhillip Lougher aimed at embedded systems with slower CPUs where the overheads 1474b676d2dSPhillip Lougher of zlib are too high. 1484b676d2dSPhillip Lougher 1494b676d2dSPhillip Lougher LZO is not the standard compression used in Squashfs and so most 1504b676d2dSPhillip Lougher file systems will be readable without selecting this option. 1514b676d2dSPhillip Lougher 1524b676d2dSPhillip Lougher If unsure, say N. 15379cb8cedSChan Jeong 1547a43ae52SPhillip Lougherconfig SQUASHFS_XZ 1557a43ae52SPhillip Lougher bool "Include support for XZ compressed file systems" 1567a43ae52SPhillip Lougher depends on SQUASHFS 1577a43ae52SPhillip Lougher select XZ_DEC 1587a43ae52SPhillip Lougher help 1597a43ae52SPhillip Lougher Saying Y here includes support for reading Squashfs file systems 16070f23fd6SJustin P. Mattock compressed with XZ compression. XZ gives better compression than 1617a43ae52SPhillip Lougher the default zlib compression, at the expense of greater CPU and 1627a43ae52SPhillip Lougher memory overhead. 1637a43ae52SPhillip Lougher 1647a43ae52SPhillip Lougher XZ is not the standard compression used in Squashfs and so most 1657a43ae52SPhillip Lougher file systems will be readable without selecting this option. 1667a43ae52SPhillip Lougher 1677a43ae52SPhillip Lougher If unsure, say N. 1687a43ae52SPhillip Lougher 16987bf54bbSSean Purcellconfig SQUASHFS_ZSTD 17087bf54bbSSean Purcell bool "Include support for ZSTD compressed file systems" 17187bf54bbSSean Purcell depends on SQUASHFS 17287bf54bbSSean Purcell select ZSTD_DECOMPRESS 17387bf54bbSSean Purcell help 17487bf54bbSSean Purcell Saying Y here includes support for reading Squashfs file systems 17587bf54bbSSean Purcell compressed with ZSTD compression. ZSTD gives better compression than 17687bf54bbSSean Purcell the default ZLIB compression, while using less CPU. 17787bf54bbSSean Purcell 17887bf54bbSSean Purcell ZSTD is not the standard compression used in Squashfs and so most 17987bf54bbSSean Purcell file systems will be readable without selecting this option. 18087bf54bbSSean Purcell 18187bf54bbSSean Purcell If unsure, say N. 18287bf54bbSSean Purcell 1837657cacfSPhillip Lougherconfig SQUASHFS_4K_DEVBLK_SIZE 1847657cacfSPhillip Lougher bool "Use 4K device block size?" 1857657cacfSPhillip Lougher depends on SQUASHFS 1867657cacfSPhillip Lougher help 1877657cacfSPhillip Lougher By default Squashfs sets the dev block size (sb_min_blocksize) 1887657cacfSPhillip Lougher to 1K or the smallest block size supported by the block device 1897657cacfSPhillip Lougher (if larger). This, because blocks are packed together and 1907657cacfSPhillip Lougher unaligned in Squashfs, should reduce latency. 1917657cacfSPhillip Lougher 1927657cacfSPhillip Lougher This, however, gives poor performance on MTD NAND devices where 1937657cacfSPhillip Lougher the optimal I/O size is 4K (even though the devices can support 1947657cacfSPhillip Lougher smaller block sizes). 1957657cacfSPhillip Lougher 1967657cacfSPhillip Lougher Using a 4K device block size may also improve overall I/O 1977657cacfSPhillip Lougher performance for some file access patterns (e.g. sequential 1987657cacfSPhillip Lougher accesses of files in filesystem order) on all media. 1997657cacfSPhillip Lougher 2007657cacfSPhillip Lougher Setting this option will force Squashfs to use a 4K device block 2017657cacfSPhillip Lougher size by default. 2027657cacfSPhillip Lougher 2037657cacfSPhillip Lougher If unsure, say N. 2047657cacfSPhillip Lougher 20522635ec9SAlexey Dobriyanconfig SQUASHFS_EMBEDDED 20622635ec9SAlexey Dobriyan bool "Additional option for memory-constrained systems" 20722635ec9SAlexey Dobriyan depends on SQUASHFS 20822635ec9SAlexey Dobriyan help 20922635ec9SAlexey Dobriyan Saying Y here allows you to specify cache size. 21022635ec9SAlexey Dobriyan 21122635ec9SAlexey Dobriyan If unsure, say N. 21222635ec9SAlexey Dobriyan 21322635ec9SAlexey Dobriyanconfig SQUASHFS_FRAGMENT_CACHE_SIZE 21422635ec9SAlexey Dobriyan int "Number of fragments cached" if SQUASHFS_EMBEDDED 21522635ec9SAlexey Dobriyan depends on SQUASHFS 21622635ec9SAlexey Dobriyan default "3" 21722635ec9SAlexey Dobriyan help 21822635ec9SAlexey Dobriyan By default SquashFS caches the last 3 fragments read from 21922635ec9SAlexey Dobriyan the filesystem. Increasing this amount may mean SquashFS 22022635ec9SAlexey Dobriyan has to re-read fragments less often from disk, at the expense 22122635ec9SAlexey Dobriyan of extra system memory. Decreasing this amount will mean 22222635ec9SAlexey Dobriyan SquashFS uses less memory at the expense of extra reads from disk. 22322635ec9SAlexey Dobriyan 22422635ec9SAlexey Dobriyan Note there must be at least one cached fragment. Anything 22522635ec9SAlexey Dobriyan much more than three will probably not make much difference. 226