mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
With all the previous preparations, it's finally time to enable the huge folio support. - The max folio size Here we define BTRFS_MAX_FOLIO_SIZE, which is fixed at 2MiB. This will ensure we have a large enough but not too large folio for btrfs. This limit applies to all systems regardless of page size. Then we also define BTRFS_MAX_BLOCKS_PER_FOLIO, which depends on CONFIG_BTRFS_EXPERIMENTAL. If it's an experimental build, BTRFS_MAX_BLOCKS_PER_FOLIO is 512, otherwise it's BITS_PER_LONG. The filemap max order will be calculated using both BTRFS_MAX_FOLIO_SIZE and BTRFS_MAX_BLOCKS_PER_FOLIO. E.g. for 64K page size with 64K fs block size, the limit will be BTRFS_MAX_FOLIO_SIZE (2M), which limits the filemap max order to 5. This will be lower than the old order (6), but folios larger than 2M are rarely any better for IO performance. Meanwhile excessively large folios can cause other problems like stalling the IO pipeline for too long. For 4K page size and 4K fs block size, the limit will be increased to 2M from the old 256K. This new size is constrained by both BTRFS_MAX_FOLIO_SIZE (2M) and BTRFS_MAX_BLOCKS_PER_FOLIO (512 * 4K), allowing x86_64 to achieve huge folio support, and the filemap max order will be 9. - btrfs_bio_ctrl::submit_bitmap This will be enlarged to contain BTRFS_MAX_BLOCKS_PER_FOLIO bits, and this will be on-stack memory. This will increase on-stack memory usage by 56 bytes compared to the baseline (before the first patch in the series). - Local @delalloc_bitmap inside writepage_delalloc() Unfortunately we cannot afford to handle an allocation error here, thus again we use on-stack memory. Thus this will increase on-stack memory usage by 56 bytes again. So unfortunately this means during the delalloc window, the writeback path will have +112 bytes on-stack memory usage, and for other cases the writeback path will have +56 bytes on-stack memory usage. The +56 bytes (btrfs_bio_ctrl::submit_bitmap) can be removed after we have reworked the compression submission, so the current on-stack submit_bitmap is mostly a workaround until then. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
118 lines
3.5 KiB
Plaintext
118 lines
3.5 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
config BTRFS_FS
|
|
tristate "Btrfs filesystem support"
|
|
select BLK_CGROUP_PUNT_BIO
|
|
select CRC32
|
|
select CRYPTO_LIB_BLAKE2B
|
|
select CRYPTO_LIB_SHA256
|
|
select ZLIB_INFLATE
|
|
select ZLIB_DEFLATE
|
|
select LZO_COMPRESS
|
|
select LZO_DECOMPRESS
|
|
select ZSTD_COMPRESS
|
|
select ZSTD_DECOMPRESS
|
|
select FS_IOMAP
|
|
select RAID6_PQ
|
|
select XOR_BLOCKS
|
|
select XXHASH
|
|
depends on PAGE_SIZE_LESS_THAN_256KB
|
|
|
|
help
|
|
Btrfs is a general purpose copy-on-write filesystem with extents,
|
|
writable snapshotting, support for multiple devices and many more
|
|
features focused on fault tolerance, repair and easy administration.
|
|
|
|
The filesystem disk format is no longer unstable, and it's not
|
|
expected to change unless there are strong reasons to do so. If there
|
|
is a format change, file systems with a unchanged format will
|
|
continue to be mountable and usable by newer kernels.
|
|
|
|
For more information, please see the web pages at
|
|
https://btrfs.readthedocs.io
|
|
|
|
To compile this file system support as a module, choose M here. The
|
|
module will be called btrfs.
|
|
|
|
If unsure, say N.
|
|
|
|
config BTRFS_FS_POSIX_ACL
|
|
bool "Btrfs POSIX Access Control Lists"
|
|
depends on BTRFS_FS
|
|
select FS_POSIX_ACL
|
|
help
|
|
POSIX Access Control Lists (ACLs) support permissions for users and
|
|
groups beyond the owner/group/world scheme.
|
|
|
|
If you don't know what Access Control Lists are, say N
|
|
|
|
config BTRFS_FS_RUN_SANITY_TESTS
|
|
bool "Btrfs will run sanity tests upon loading"
|
|
depends on BTRFS_FS
|
|
help
|
|
This will run sanity tests for core functionality like free space,
|
|
extent maps, extent io, extent buffers, inodes, qgroups and others,
|
|
at module load time. These are mostly regression tests and are only
|
|
interesting to developers.
|
|
|
|
If unsure, say N.
|
|
|
|
config BTRFS_DEBUG
|
|
bool "Btrfs debugging support"
|
|
depends on BTRFS_FS
|
|
select REF_TRACKER if STACKTRACE_SUPPORT
|
|
help
|
|
Enable run-time debugging support for the btrfs filesystem.
|
|
|
|
Additional potentially expensive checks, debugging functionality or
|
|
sysfs exported information is enabled, like leak checks of internal
|
|
objects, optional forced space fragmentation and /sys/fs/btrfs/debug .
|
|
This has negative impact on performance.
|
|
|
|
If unsure, say N.
|
|
|
|
config BTRFS_ASSERT
|
|
bool "Btrfs assert support"
|
|
depends on BTRFS_FS
|
|
help
|
|
Enable run-time assertion checking. Additional safety checks are
|
|
done, simple enough not to affect performance but verify invariants
|
|
and assumptions of code to run properly. This may result in panics,
|
|
and is meant for developers but can be enabled in general.
|
|
|
|
If unsure, say N.
|
|
|
|
config BTRFS_EXPERIMENTAL
|
|
bool "Btrfs experimental features"
|
|
depends on BTRFS_FS
|
|
default n
|
|
help
|
|
Enable experimental features. These features may not be stable enough
|
|
for end users. This is meant for btrfs developers or users who wish
|
|
to test the functionality and report problems.
|
|
|
|
Current list:
|
|
|
|
- RAID mirror read policy - additional read policies for balancing
|
|
reading from redundant block group
|
|
profiles (currently: pid, round-robin,
|
|
fixed devid)
|
|
|
|
- send stream protocol v3 - fs-verity support
|
|
|
|
- raid-stripe-tree - additional mapping of extents to devices to
|
|
support RAID1* profiles on zoned devices,
|
|
RAID56 not yet supported
|
|
|
|
- extent tree v2 - complex rework of extent tracking
|
|
|
|
- block size > page size support
|
|
|
|
- huge folios for data - folios can be as large as 2MiB now
|
|
|
|
- asynchronous checksum generation for data writes
|
|
|
|
- remap-tree - logical address remapping tree
|
|
|
|
If unsure, say N.
|