Kconfig 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config SQUASHFS
  3. tristate "SquashFS 4.0 - Squashed file system support"
  4. depends on BLOCK
  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
  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
  14. timestamps.
  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. If you want to compile this as a module ( = code which can be
  20. inserted in and removed from the running kernel whenever you want),
  21. say M here. The module will be called squashfs. Note that the root
  22. file system (the one containing the directory /) cannot be compiled
  23. as a module.
  24. If unsure, say N.
  25. choice
  26. prompt "File decompression options"
  27. depends on SQUASHFS
  28. help
  29. Squashfs now supports two options for decompressing file
  30. data. Traditionally Squashfs has decompressed into an
  31. intermediate buffer and then memcopied it into the page cache.
  32. Squashfs now supports the ability to decompress directly into
  33. the page cache.
  34. If unsure, select "Decompress file data into an intermediate buffer"
  35. config SQUASHFS_FILE_CACHE
  36. bool "Decompress file data into an intermediate buffer"
  37. help
  38. Decompress file data into an intermediate buffer and then
  39. memcopy it into the page cache.
  40. config SQUASHFS_FILE_DIRECT
  41. bool "Decompress files directly into the page cache"
  42. help
  43. Directly decompress file data into the page cache.
  44. Doing so can significantly improve performance because
  45. it eliminates a memcpy and it also removes the lock contention
  46. on the single buffer.
  47. endchoice
  48. config SQUASHFS_DECOMP_SINGLE
  49. depends on SQUASHFS
  50. def_bool n
  51. config SQUASHFS_DECOMP_MULTI
  52. depends on SQUASHFS
  53. def_bool n
  54. config SQUASHFS_DECOMP_MULTI_PERCPU
  55. depends on SQUASHFS
  56. def_bool n
  57. config SQUASHFS_CHOICE_DECOMP_BY_MOUNT
  58. bool "Select the parallel decompression mode during mount"
  59. depends on SQUASHFS
  60. default n
  61. select SQUASHFS_DECOMP_SINGLE
  62. select SQUASHFS_DECOMP_MULTI
  63. select SQUASHFS_DECOMP_MULTI_PERCPU
  64. select SQUASHFS_MOUNT_DECOMP_THREADS
  65. help
  66. Compile all parallel decompression modes and specify the
  67. decompression mode by setting "threads=" during mount.
  68. default Decompressor parallelisation is SQUASHFS_DECOMP_SINGLE
  69. choice
  70. prompt "Select decompression parallel mode at compile time"
  71. depends on SQUASHFS
  72. depends on !SQUASHFS_CHOICE_DECOMP_BY_MOUNT
  73. help
  74. Squashfs now supports three parallelisation options for
  75. decompression. Each one exhibits various trade-offs between
  76. decompression performance and CPU and memory usage.
  77. If in doubt, select "Single threaded compression"
  78. config SQUASHFS_COMPILE_DECOMP_SINGLE
  79. bool "Single threaded compression"
  80. select SQUASHFS_DECOMP_SINGLE
  81. help
  82. Traditionally Squashfs has used single-threaded decompression.
  83. Only one block (data or metadata) can be decompressed at any
  84. one time. This limits CPU and memory usage to a minimum.
  85. config SQUASHFS_COMPILE_DECOMP_MULTI
  86. bool "Use multiple decompressors for parallel I/O"
  87. select SQUASHFS_DECOMP_MULTI
  88. help
  89. By default Squashfs uses a single decompressor but it gives
  90. poor performance on parallel I/O workloads when using multiple CPU
  91. machines due to waiting on decompressor availability.
  92. If you have a parallel I/O workload and your system has enough memory,
  93. using this option may improve overall I/O performance.
  94. This decompressor implementation uses up to two parallel
  95. decompressors per core. It dynamically allocates decompressors
  96. on a demand basis.
  97. config SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU
  98. bool "Use percpu multiple decompressors for parallel I/O"
  99. select SQUASHFS_DECOMP_MULTI_PERCPU
  100. help
  101. By default Squashfs uses a single decompressor but it gives
  102. poor performance on parallel I/O workloads when using multiple CPU
  103. machines due to waiting on decompressor availability.
  104. This decompressor implementation uses a maximum of one
  105. decompressor per core. It uses percpu variables to ensure
  106. decompression is load-balanced across the cores.
  107. endchoice
  108. config SQUASHFS_MOUNT_DECOMP_THREADS
  109. bool "Add the mount parameter 'threads=' for squashfs"
  110. depends on SQUASHFS
  111. depends on SQUASHFS_DECOMP_MULTI
  112. default n
  113. help
  114. Use threads= to set the decompression parallel mode and the number of threads.
  115. If SQUASHFS_CHOICE_DECOMP_BY_MOUNT=y
  116. threads=<single|multi|percpu|1|2|3|...>
  117. else
  118. threads=<2|3|...>
  119. The upper limit is num_online_cpus() * 2.
  120. config SQUASHFS_XATTR
  121. bool "Squashfs XATTR support"
  122. depends on SQUASHFS
  123. help
  124. Saying Y here includes support for extended attributes (xattrs).
  125. Xattrs are name:value pairs associated with inodes by
  126. the kernel or by users (see the attr(5) manual page).
  127. If unsure, say N.
  128. config SQUASHFS_ZLIB
  129. bool "Include support for ZLIB compressed file systems"
  130. depends on SQUASHFS
  131. select ZLIB_INFLATE
  132. default y
  133. help
  134. ZLIB compression is the standard compression used by Squashfs
  135. file systems. It offers a good trade-off between compression
  136. achieved and the amount of CPU time and memory necessary to
  137. compress and decompress.
  138. If unsure, say Y.
  139. config SQUASHFS_LZ4
  140. bool "Include support for LZ4 compressed file systems"
  141. depends on SQUASHFS
  142. select LZ4_DECOMPRESS
  143. help
  144. Saying Y here includes support for reading Squashfs file systems
  145. compressed with LZ4 compression. LZ4 compression is mainly
  146. aimed at embedded systems with slower CPUs where the overheads
  147. of zlib are too high.
  148. LZ4 is not the standard compression used in Squashfs and so most
  149. file systems will be readable without selecting this option.
  150. If unsure, say N.
  151. config SQUASHFS_LZO
  152. bool "Include support for LZO compressed file systems"
  153. depends on SQUASHFS
  154. select LZO_DECOMPRESS
  155. help
  156. Saying Y here includes support for reading Squashfs file systems
  157. compressed with LZO compression. LZO compression is mainly
  158. aimed at embedded systems with slower CPUs where the overheads
  159. of zlib are too high.
  160. LZO is not the standard compression used in Squashfs and so most
  161. file systems will be readable without selecting this option.
  162. If unsure, say N.
  163. config SQUASHFS_XZ
  164. bool "Include support for XZ compressed file systems"
  165. depends on SQUASHFS
  166. select XZ_DEC
  167. help
  168. Saying Y here includes support for reading Squashfs file systems
  169. compressed with XZ compression. XZ gives better compression than
  170. the default zlib compression, at the expense of greater CPU and
  171. memory overhead.
  172. XZ is not the standard compression used in Squashfs and so most
  173. file systems will be readable without selecting this option.
  174. If unsure, say N.
  175. config SQUASHFS_ZSTD
  176. bool "Include support for ZSTD compressed file systems"
  177. depends on SQUASHFS
  178. select ZSTD_DECOMPRESS
  179. help
  180. Saying Y here includes support for reading Squashfs file systems
  181. compressed with ZSTD compression. ZSTD gives better compression than
  182. the default ZLIB compression, while using less CPU.
  183. ZSTD is not the standard compression used in Squashfs and so most
  184. file systems will be readable without selecting this option.
  185. If unsure, say N.
  186. config SQUASHFS_4K_DEVBLK_SIZE
  187. bool "Use 4K device block size?"
  188. depends on SQUASHFS
  189. help
  190. By default Squashfs sets the dev block size (sb_min_blocksize)
  191. to 1K or the smallest block size supported by the block device
  192. (if larger). This, because blocks are packed together and
  193. unaligned in Squashfs, should reduce latency.
  194. This, however, gives poor performance on MTD NAND devices where
  195. the optimal I/O size is 4K (even though the devices can support
  196. smaller block sizes).
  197. Using a 4K device block size may also improve overall I/O
  198. performance for some file access patterns (e.g. sequential
  199. accesses of files in filesystem order) on all media.
  200. Setting this option will force Squashfs to use a 4K device block
  201. size by default.
  202. If unsure, say N.
  203. config SQUASHFS_EMBEDDED
  204. bool "Additional option for memory-constrained systems"
  205. depends on SQUASHFS
  206. help
  207. Saying Y here allows you to specify cache size.
  208. If unsure, say N.
  209. config SQUASHFS_FRAGMENT_CACHE_SIZE
  210. int "Number of fragments cached" if SQUASHFS_EMBEDDED
  211. depends on SQUASHFS
  212. default "3"
  213. help
  214. By default SquashFS caches the last 3 fragments read from
  215. the filesystem. Increasing this amount may mean SquashFS
  216. has to re-read fragments less often from disk, at the expense
  217. of extra system memory. Decreasing this amount will mean
  218. SquashFS uses less memory at the expense of extra reads from disk.
  219. Note there must be at least one cached fragment. Anything
  220. much more than three will probably not make much difference.