Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Alexey Dobriyan | 22635ec | 2009-01-22 10:57:46 +0300 | [diff] [blame] | 2 | config SQUASHFS |
| 3 | tristate "SquashFS 4.0 - Squashed file system support" |
| 4 | depends on BLOCK |
Alexey Dobriyan | 22635ec | 2009-01-22 10:57:46 +0300 | [diff] [blame] | 5 | help |
| 6 | Saying Y here includes support for SquashFS 4.0 (a Compressed |
| 7 | Read-Only File System). Squashfs is a highly compressed read-only |
Phillip Lougher | 681ffe2 | 2011-02-28 16:21:34 +0000 | [diff] [blame] | 8 | filesystem for Linux. It uses zlib, lzo or xz compression to |
| 9 | compress both files, inodes and directories. Inodes in the system |
| 10 | are very small and all blocks are packed to minimise data overhead. |
| 11 | Block sizes greater than 4K are supported up to a maximum of 1 Mbytes |
| 12 | (default block size 128K). SquashFS 4.0 supports 64 bit filesystems |
| 13 | and files (larger than 4GB), full uid/gid information, hard links and |
Phillip Lougher | 4b676d2 | 2010-08-05 23:42:54 +0100 | [diff] [blame] | 14 | timestamps. |
Alexey Dobriyan | 22635ec | 2009-01-22 10:57:46 +0300 | [diff] [blame] | 15 | |
| 16 | Squashfs is intended for general read-only filesystem use, for |
| 17 | archival use (i.e. in cases where a .tar.gz file may be used), and in |
| 18 | embedded systems where low overhead is needed. Further information |
| 19 | and tools are available from http://squashfs.sourceforge.net. |
| 20 | |
| 21 | If you want to compile this as a module ( = code which can be |
| 22 | inserted in and removed from the running kernel whenever you want), |
Paul Bolle | 395cf96 | 2011-08-15 02:02:26 +0200 | [diff] [blame] | 23 | say M here. The module will be called squashfs. Note that the root |
| 24 | file system (the one containing the directory /) cannot be compiled |
| 25 | as a module. |
Alexey Dobriyan | 22635ec | 2009-01-22 10:57:46 +0300 | [diff] [blame] | 26 | |
| 27 | If unsure, say N. |
| 28 | |
Phillip Lougher | d208383 | 2013-11-18 02:31:36 +0000 | [diff] [blame] | 29 | choice |
Phillip Lougher | 0d455c1 | 2013-11-13 02:04:19 +0000 | [diff] [blame] | 30 | prompt "File decompression options" |
| 31 | depends on SQUASHFS |
| 32 | help |
| 33 | Squashfs now supports two options for decompressing file |
| 34 | data. Traditionally Squashfs has decompressed into an |
| 35 | intermediate buffer and then memcopied it into the page cache. |
| 36 | Squashfs now supports the ability to decompress directly into |
| 37 | the page cache. |
| 38 | |
| 39 | If unsure, select "Decompress file data into an intermediate buffer" |
| 40 | |
| 41 | config SQUASHFS_FILE_CACHE |
| 42 | bool "Decompress file data into an intermediate buffer" |
| 43 | help |
| 44 | Decompress file data into an intermediate buffer and then |
| 45 | memcopy it into the page cache. |
| 46 | |
| 47 | config SQUASHFS_FILE_DIRECT |
| 48 | bool "Decompress files directly into the page cache" |
| 49 | help |
| 50 | Directly decompress file data into the page cache. |
| 51 | Doing so can significantly improve performance because |
| 52 | it eliminates a memcpy and it also removes the lock contention |
| 53 | on the single buffer. |
| 54 | |
| 55 | endchoice |
| 56 | |
| 57 | choice |
Phillip Lougher | d208383 | 2013-11-18 02:31:36 +0000 | [diff] [blame] | 58 | prompt "Decompressor parallelisation options" |
| 59 | depends on SQUASHFS |
| 60 | help |
| 61 | Squashfs now supports three parallelisation options for |
| 62 | decompression. Each one exhibits various trade-offs between |
| 63 | decompression performance and CPU and memory usage. |
| 64 | |
| 65 | If in doubt, select "Single threaded compression" |
| 66 | |
| 67 | config SQUASHFS_DECOMP_SINGLE |
| 68 | bool "Single threaded compression" |
| 69 | help |
| 70 | Traditionally Squashfs has used single-threaded decompression. |
| 71 | Only one block (data or metadata) can be decompressed at any |
| 72 | one time. This limits CPU and memory usage to a minimum. |
| 73 | |
| 74 | config SQUASHFS_DECOMP_MULTI |
| 75 | bool "Use multiple decompressors for parallel I/O" |
| 76 | help |
| 77 | By default Squashfs uses a single decompressor but it gives |
| 78 | poor performance on parallel I/O workloads when using multiple CPU |
| 79 | machines due to waiting on decompressor availability. |
| 80 | |
| 81 | If you have a parallel I/O workload and your system has enough memory, |
| 82 | using this option may improve overall I/O performance. |
| 83 | |
| 84 | This decompressor implementation uses up to two parallel |
| 85 | decompressors per core. It dynamically allocates decompressors |
| 86 | on a demand basis. |
| 87 | |
| 88 | config SQUASHFS_DECOMP_MULTI_PERCPU |
| 89 | bool "Use percpu multiple decompressors for parallel I/O" |
| 90 | help |
| 91 | By default Squashfs uses a single decompressor but it gives |
| 92 | poor performance on parallel I/O workloads when using multiple CPU |
| 93 | machines due to waiting on decompressor availability. |
| 94 | |
| 95 | This decompressor implementation uses a maximum of one |
| 96 | decompressor per core. It uses percpu variables to ensure |
| 97 | decompression is load-balanced across the cores. |
| 98 | |
| 99 | endchoice |
| 100 | |
Phillip Lougher | 637d5c9 | 2010-05-31 18:46:29 +0100 | [diff] [blame] | 101 | config SQUASHFS_XATTR |
Phillip Lougher | 01e5b4e | 2010-05-17 19:39:02 +0100 | [diff] [blame] | 102 | bool "Squashfs XATTR support" |
| 103 | depends on SQUASHFS |
Phillip Lougher | 01e5b4e | 2010-05-17 19:39:02 +0100 | [diff] [blame] | 104 | help |
| 105 | Saying Y here includes support for extended attributes (xattrs). |
| 106 | Xattrs are name:value pairs associated with inodes by |
| 107 | the kernel or by users (see the attr(5) manual page). |
| 108 | |
| 109 | If unsure, say N. |
| 110 | |
Phillip Lougher | cc6d349 | 2011-07-22 03:01:28 +0100 | [diff] [blame] | 111 | config SQUASHFS_ZLIB |
| 112 | bool "Include support for ZLIB compressed file systems" |
| 113 | depends on SQUASHFS |
| 114 | select ZLIB_INFLATE |
| 115 | default y |
| 116 | help |
| 117 | ZLIB compression is the standard compression used by Squashfs |
| 118 | file systems. It offers a good trade-off between compression |
| 119 | achieved and the amount of CPU time and memory necessary to |
| 120 | compress and decompress. |
| 121 | |
| 122 | If unsure, say Y. |
| 123 | |
Phillip Lougher | 6242164 | 2014-11-27 18:48:44 +0000 | [diff] [blame] | 124 | config SQUASHFS_LZ4 |
| 125 | bool "Include support for LZ4 compressed file systems" |
| 126 | depends on SQUASHFS |
| 127 | select LZ4_DECOMPRESS |
| 128 | help |
| 129 | Saying Y here includes support for reading Squashfs file systems |
| 130 | compressed with LZ4 compression. LZ4 compression is mainly |
| 131 | aimed at embedded systems with slower CPUs where the overheads |
| 132 | of zlib are too high. |
| 133 | |
| 134 | LZ4 is not the standard compression used in Squashfs and so most |
| 135 | file systems will be readable without selecting this option. |
| 136 | |
| 137 | If unsure, say N. |
| 138 | |
Chan Jeong | 79cb8ce | 2010-08-05 02:29:59 +0100 | [diff] [blame] | 139 | config SQUASHFS_LZO |
| 140 | bool "Include support for LZO compressed file systems" |
| 141 | depends on SQUASHFS |
| 142 | select LZO_DECOMPRESS |
Phillip Lougher | 4b676d2 | 2010-08-05 23:42:54 +0100 | [diff] [blame] | 143 | help |
| 144 | Saying Y here includes support for reading Squashfs file systems |
Justin P. Mattock | 70f23fd | 2011-05-10 10:16:21 +0200 | [diff] [blame] | 145 | compressed with LZO compression. LZO compression is mainly |
Phillip Lougher | 4b676d2 | 2010-08-05 23:42:54 +0100 | [diff] [blame] | 146 | aimed at embedded systems with slower CPUs where the overheads |
| 147 | of zlib are too high. |
| 148 | |
| 149 | LZO is not the standard compression used in Squashfs and so most |
| 150 | file systems will be readable without selecting this option. |
| 151 | |
| 152 | If unsure, say N. |
Chan Jeong | 79cb8ce | 2010-08-05 02:29:59 +0100 | [diff] [blame] | 153 | |
Phillip Lougher | 7a43ae5 | 2010-12-09 02:08:31 +0000 | [diff] [blame] | 154 | config SQUASHFS_XZ |
| 155 | bool "Include support for XZ compressed file systems" |
| 156 | depends on SQUASHFS |
| 157 | select XZ_DEC |
| 158 | help |
| 159 | Saying Y here includes support for reading Squashfs file systems |
Justin P. Mattock | 70f23fd | 2011-05-10 10:16:21 +0200 | [diff] [blame] | 160 | compressed with XZ compression. XZ gives better compression than |
Phillip Lougher | 7a43ae5 | 2010-12-09 02:08:31 +0000 | [diff] [blame] | 161 | the default zlib compression, at the expense of greater CPU and |
| 162 | memory overhead. |
| 163 | |
| 164 | XZ is not the standard compression used in Squashfs and so most |
| 165 | file systems will be readable without selecting this option. |
| 166 | |
| 167 | If unsure, say N. |
| 168 | |
Sean Purcell | 87bf54b | 2017-08-09 19:42:36 -0700 | [diff] [blame] | 169 | config SQUASHFS_ZSTD |
| 170 | bool "Include support for ZSTD compressed file systems" |
| 171 | depends on SQUASHFS |
| 172 | select ZSTD_DECOMPRESS |
| 173 | help |
| 174 | Saying Y here includes support for reading Squashfs file systems |
| 175 | compressed with ZSTD compression. ZSTD gives better compression than |
| 176 | the default ZLIB compression, while using less CPU. |
| 177 | |
| 178 | ZSTD is not the standard compression used in Squashfs and so most |
| 179 | file systems will be readable without selecting this option. |
| 180 | |
| 181 | If unsure, say N. |
| 182 | |
Phillip Lougher | 7657cac | 2011-10-22 01:34:48 +0100 | [diff] [blame] | 183 | config SQUASHFS_4K_DEVBLK_SIZE |
| 184 | bool "Use 4K device block size?" |
| 185 | depends on SQUASHFS |
| 186 | help |
| 187 | By default Squashfs sets the dev block size (sb_min_blocksize) |
| 188 | to 1K or the smallest block size supported by the block device |
| 189 | (if larger). This, because blocks are packed together and |
| 190 | unaligned in Squashfs, should reduce latency. |
| 191 | |
| 192 | This, however, gives poor performance on MTD NAND devices where |
| 193 | the optimal I/O size is 4K (even though the devices can support |
| 194 | smaller block sizes). |
| 195 | |
| 196 | Using a 4K device block size may also improve overall I/O |
| 197 | performance for some file access patterns (e.g. sequential |
| 198 | accesses of files in filesystem order) on all media. |
| 199 | |
| 200 | Setting this option will force Squashfs to use a 4K device block |
| 201 | size by default. |
| 202 | |
| 203 | If unsure, say N. |
| 204 | |
Alexey Dobriyan | 22635ec | 2009-01-22 10:57:46 +0300 | [diff] [blame] | 205 | config SQUASHFS_EMBEDDED |
Phillip Lougher | 4b676d2 | 2010-08-05 23:42:54 +0100 | [diff] [blame] | 206 | bool "Additional option for memory-constrained systems" |
Alexey Dobriyan | 22635ec | 2009-01-22 10:57:46 +0300 | [diff] [blame] | 207 | depends on SQUASHFS |
Alexey Dobriyan | 22635ec | 2009-01-22 10:57:46 +0300 | [diff] [blame] | 208 | help |
| 209 | Saying Y here allows you to specify cache size. |
| 210 | |
| 211 | If unsure, say N. |
| 212 | |
| 213 | config SQUASHFS_FRAGMENT_CACHE_SIZE |
| 214 | int "Number of fragments cached" if SQUASHFS_EMBEDDED |
| 215 | depends on SQUASHFS |
| 216 | default "3" |
| 217 | help |
| 218 | By default SquashFS caches the last 3 fragments read from |
| 219 | the filesystem. Increasing this amount may mean SquashFS |
| 220 | has to re-read fragments less often from disk, at the expense |
| 221 | of extra system memory. Decreasing this amount will mean |
| 222 | SquashFS uses less memory at the expense of extra reads from disk. |
| 223 | |
| 224 | Note there must be at least one cached fragment. Anything |
| 225 | much more than three will probably not make much difference. |