Kconfig 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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. choice
  49. prompt "Decompressor parallelisation options"
  50. depends on SQUASHFS
  51. help
  52. Squashfs now supports three parallelisation options for
  53. decompression. Each one exhibits various trade-offs between
  54. decompression performance and CPU and memory usage.
  55. If in doubt, select "Single threaded compression"
  56. config SQUASHFS_DECOMP_SINGLE
  57. bool "Single threaded compression"
  58. help
  59. Traditionally Squashfs has used single-threaded decompression.
  60. Only one block (data or metadata) can be decompressed at any
  61. one time. This limits CPU and memory usage to a minimum.
  62. config SQUASHFS_DECOMP_MULTI
  63. bool "Use multiple decompressors for parallel I/O"
  64. help
  65. By default Squashfs uses a single decompressor but it gives
  66. poor performance on parallel I/O workloads when using multiple CPU
  67. machines due to waiting on decompressor availability.
  68. If you have a parallel I/O workload and your system has enough memory,
  69. using this option may improve overall I/O performance.
  70. This decompressor implementation uses up to two parallel
  71. decompressors per core. It dynamically allocates decompressors
  72. on a demand basis.
  73. config SQUASHFS_DECOMP_MULTI_PERCPU
  74. bool "Use percpu 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. This decompressor implementation uses a maximum of one
  80. decompressor per core. It uses percpu variables to ensure
  81. decompression is load-balanced across the cores.
  82. endchoice
  83. config SQUASHFS_XATTR
  84. bool "Squashfs XATTR support"
  85. depends on SQUASHFS
  86. help
  87. Saying Y here includes support for extended attributes (xattrs).
  88. Xattrs are name:value pairs associated with inodes by
  89. the kernel or by users (see the attr(5) manual page).
  90. If unsure, say N.
  91. config SQUASHFS_ZLIB
  92. bool "Include support for ZLIB compressed file systems"
  93. depends on SQUASHFS
  94. select ZLIB_INFLATE
  95. default y
  96. help
  97. ZLIB compression is the standard compression used by Squashfs
  98. file systems. It offers a good trade-off between compression
  99. achieved and the amount of CPU time and memory necessary to
  100. compress and decompress.
  101. If unsure, say Y.
  102. config SQUASHFS_LZ4
  103. bool "Include support for LZ4 compressed file systems"
  104. depends on SQUASHFS
  105. select LZ4_DECOMPRESS
  106. help
  107. Saying Y here includes support for reading Squashfs file systems
  108. compressed with LZ4 compression. LZ4 compression is mainly
  109. aimed at embedded systems with slower CPUs where the overheads
  110. of zlib are too high.
  111. LZ4 is not the standard compression used in Squashfs and so most
  112. file systems will be readable without selecting this option.
  113. If unsure, say N.
  114. config SQUASHFS_LZO
  115. bool "Include support for LZO compressed file systems"
  116. depends on SQUASHFS
  117. select LZO_DECOMPRESS
  118. help
  119. Saying Y here includes support for reading Squashfs file systems
  120. compressed with LZO compression. LZO compression is mainly
  121. aimed at embedded systems with slower CPUs where the overheads
  122. of zlib are too high.
  123. LZO is not the standard compression used in Squashfs and so most
  124. file systems will be readable without selecting this option.
  125. If unsure, say N.
  126. config SQUASHFS_XZ
  127. bool "Include support for XZ compressed file systems"
  128. depends on SQUASHFS
  129. select XZ_DEC
  130. help
  131. Saying Y here includes support for reading Squashfs file systems
  132. compressed with XZ compression. XZ gives better compression than
  133. the default zlib compression, at the expense of greater CPU and
  134. memory overhead.
  135. XZ is not the standard compression used in Squashfs and so most
  136. file systems will be readable without selecting this option.
  137. If unsure, say N.
  138. config SQUASHFS_ZSTD
  139. bool "Include support for ZSTD compressed file systems"
  140. depends on SQUASHFS
  141. select ZSTD_DECOMPRESS
  142. help
  143. Saying Y here includes support for reading Squashfs file systems
  144. compressed with ZSTD compression. ZSTD gives better compression than
  145. the default ZLIB compression, while using less CPU.
  146. ZSTD is not the standard compression used in Squashfs and so most
  147. file systems will be readable without selecting this option.
  148. If unsure, say N.
  149. config SQUASHFS_4K_DEVBLK_SIZE
  150. bool "Use 4K device block size?"
  151. depends on SQUASHFS
  152. help
  153. By default Squashfs sets the dev block size (sb_min_blocksize)
  154. to 1K or the smallest block size supported by the block device
  155. (if larger). This, because blocks are packed together and
  156. unaligned in Squashfs, should reduce latency.
  157. This, however, gives poor performance on MTD NAND devices where
  158. the optimal I/O size is 4K (even though the devices can support
  159. smaller block sizes).
  160. Using a 4K device block size may also improve overall I/O
  161. performance for some file access patterns (e.g. sequential
  162. accesses of files in filesystem order) on all media.
  163. Setting this option will force Squashfs to use a 4K device block
  164. size by default.
  165. If unsure, say N.
  166. config SQUASHFS_EMBEDDED
  167. bool "Additional option for memory-constrained systems"
  168. depends on SQUASHFS
  169. help
  170. Saying Y here allows you to specify cache size.
  171. If unsure, say N.
  172. config SQUASHFS_FRAGMENT_CACHE_SIZE
  173. int "Number of fragments cached" if SQUASHFS_EMBEDDED
  174. depends on SQUASHFS
  175. default "3"
  176. help
  177. By default SquashFS caches the last 3 fragments read from
  178. the filesystem. Increasing this amount may mean SquashFS
  179. has to re-read fragments less often from disk, at the expense
  180. of extra system memory. Decreasing this amount will mean
  181. SquashFS uses less memory at the expense of extra reads from disk.
  182. Note there must be at least one cached fragment. Anything
  183. much more than three will probably not make much difference.