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