blob: 916e78fabcaac819b1e9066f8394b91ea74f488a [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Alexey Dobriyan22635ec2009-01-22 10:57:46 +03002config SQUASHFS
3 tristate "SquashFS 4.0 - Squashed file system support"
4 depends on BLOCK
Alexey Dobriyan22635ec2009-01-22 10:57:46 +03005 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 Lougher681ffe22011-02-28 16:21:34 +00008 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 Lougher4b676d22010-08-05 23:42:54 +010014 timestamps.
Alexey Dobriyan22635ec2009-01-22 10:57:46 +030015
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 Bolle395cf962011-08-15 02:02:26 +020023 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 Dobriyan22635ec2009-01-22 10:57:46 +030026
27 If unsure, say N.
28
Phillip Lougherd2083832013-11-18 02:31:36 +000029choice
Phillip Lougher0d455c12013-11-13 02:04:19 +000030 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
41config 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
47config 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
55endchoice
56
57choice
Phillip Lougherd2083832013-11-18 02:31:36 +000058 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
67config 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
74config 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
88config 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
99endchoice
100
Phillip Lougher637d5c92010-05-31 18:46:29 +0100101config SQUASHFS_XATTR
Phillip Lougher01e5b4e2010-05-17 19:39:02 +0100102 bool "Squashfs XATTR support"
103 depends on SQUASHFS
Phillip Lougher01e5b4e2010-05-17 19:39:02 +0100104 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 Loughercc6d3492011-07-22 03:01:28 +0100111config 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 Lougher62421642014-11-27 18:48:44 +0000124config 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 Jeong79cb8ce2010-08-05 02:29:59 +0100139config SQUASHFS_LZO
140 bool "Include support for LZO compressed file systems"
141 depends on SQUASHFS
142 select LZO_DECOMPRESS
Phillip Lougher4b676d22010-08-05 23:42:54 +0100143 help
144 Saying Y here includes support for reading Squashfs file systems
Justin P. Mattock70f23fd2011-05-10 10:16:21 +0200145 compressed with LZO compression. LZO compression is mainly
Phillip Lougher4b676d22010-08-05 23:42:54 +0100146 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 Jeong79cb8ce2010-08-05 02:29:59 +0100153
Phillip Lougher7a43ae52010-12-09 02:08:31 +0000154config 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. Mattock70f23fd2011-05-10 10:16:21 +0200160 compressed with XZ compression. XZ gives better compression than
Phillip Lougher7a43ae52010-12-09 02:08:31 +0000161 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 Purcell87bf54b2017-08-09 19:42:36 -0700169config 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 Lougher7657cac2011-10-22 01:34:48 +0100183config 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 Dobriyan22635ec2009-01-22 10:57:46 +0300205config SQUASHFS_EMBEDDED
Phillip Lougher4b676d22010-08-05 23:42:54 +0100206 bool "Additional option for memory-constrained systems"
Alexey Dobriyan22635ec2009-01-22 10:57:46 +0300207 depends on SQUASHFS
Alexey Dobriyan22635ec2009-01-22 10:57:46 +0300208 help
209 Saying Y here allows you to specify cache size.
210
211 If unsure, say N.
212
213config 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.