Kconfig (36e66c554b5c6a9d17a229faca7a61693527b0bd) Kconfig (bb8b93b5b65130138d3c80f3136af721863f561a)
1# SPDX-License-Identifier: GPL-2.0-only
2
3menu "Memory Management options"
4
5config SELECT_MEMORY_MODEL
6 def_bool y
7 depends on ARCH_SELECT_MEMORY_MODEL
8

--- 519 unchanged lines hidden (view full) ---

528 into a page just as regular dirty bit, but unlike the latter
529 it can be cleared by hands.
530
531 See Documentation/admin-guide/mm/soft-dirty.rst for more details.
532
533config ZSWAP
534 bool "Compressed cache for swap pages (EXPERIMENTAL)"
535 depends on FRONTSWAP && CRYPTO=y
1# SPDX-License-Identifier: GPL-2.0-only
2
3menu "Memory Management options"
4
5config SELECT_MEMORY_MODEL
6 def_bool y
7 depends on ARCH_SELECT_MEMORY_MODEL
8

--- 519 unchanged lines hidden (view full) ---

528 into a page just as regular dirty bit, but unlike the latter
529 it can be cleared by hands.
530
531 See Documentation/admin-guide/mm/soft-dirty.rst for more details.
532
533config ZSWAP
534 bool "Compressed cache for swap pages (EXPERIMENTAL)"
535 depends on FRONTSWAP && CRYPTO=y
536 select CRYPTO_LZO
537 select ZPOOL
538 help
539 A lightweight compressed cache for swap pages. It takes
540 pages that are in the process of being swapped out and attempts to
541 compress them into a dynamically allocated RAM-based memory pool.
542 This can result in a significant I/O reduction on swap device and,
543 in the case where decompressing from RAM is faster that swap device
544 reads, can also improve workload performance.
545
546 This is marked experimental because it is a new feature (as of
547 v3.11) that interacts heavily with memory reclaim. While these
548 interactions don't cause any known issues on simple memory setups,
549 they have not be fully explored on the large set of potential
550 configurations and workloads that exist.
551
536 select ZPOOL
537 help
538 A lightweight compressed cache for swap pages. It takes
539 pages that are in the process of being swapped out and attempts to
540 compress them into a dynamically allocated RAM-based memory pool.
541 This can result in a significant I/O reduction on swap device and,
542 in the case where decompressing from RAM is faster that swap device
543 reads, can also improve workload performance.
544
545 This is marked experimental because it is a new feature (as of
546 v3.11) that interacts heavily with memory reclaim. While these
547 interactions don't cause any known issues on simple memory setups,
548 they have not be fully explored on the large set of potential
549 configurations and workloads that exist.
550
551choice
552 prompt "Compressed cache for swap pages default compressor"
553 depends on ZSWAP
554 default ZSWAP_COMPRESSOR_DEFAULT_LZO
555 help
556 Selects the default compression algorithm for the compressed cache
557 for swap pages.
558
559 For an overview what kind of performance can be expected from
560 a particular compression algorithm please refer to the benchmarks
561 available at the following LWN page:
562 https://lwn.net/Articles/751795/
563
564 If in doubt, select 'LZO'.
565
566 The selection made here can be overridden by using the kernel
567 command line 'zswap.compressor=' option.
568
569config ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
570 bool "Deflate"
571 select CRYPTO_DEFLATE
572 help
573 Use the Deflate algorithm as the default compression algorithm.
574
575config ZSWAP_COMPRESSOR_DEFAULT_LZO
576 bool "LZO"
577 select CRYPTO_LZO
578 help
579 Use the LZO algorithm as the default compression algorithm.
580
581config ZSWAP_COMPRESSOR_DEFAULT_842
582 bool "842"
583 select CRYPTO_842
584 help
585 Use the 842 algorithm as the default compression algorithm.
586
587config ZSWAP_COMPRESSOR_DEFAULT_LZ4
588 bool "LZ4"
589 select CRYPTO_LZ4
590 help
591 Use the LZ4 algorithm as the default compression algorithm.
592
593config ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
594 bool "LZ4HC"
595 select CRYPTO_LZ4HC
596 help
597 Use the LZ4HC algorithm as the default compression algorithm.
598
599config ZSWAP_COMPRESSOR_DEFAULT_ZSTD
600 bool "zstd"
601 select CRYPTO_ZSTD
602 help
603 Use the zstd algorithm as the default compression algorithm.
604endchoice
605
606config ZSWAP_COMPRESSOR_DEFAULT
607 string
608 depends on ZSWAP
609 default "deflate" if ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
610 default "lzo" if ZSWAP_COMPRESSOR_DEFAULT_LZO
611 default "842" if ZSWAP_COMPRESSOR_DEFAULT_842
612 default "lz4" if ZSWAP_COMPRESSOR_DEFAULT_LZ4
613 default "lz4hc" if ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
614 default "zstd" if ZSWAP_COMPRESSOR_DEFAULT_ZSTD
615 default ""
616
617choice
618 prompt "Compressed cache for swap pages default allocator"
619 depends on ZSWAP
620 default ZSWAP_ZPOOL_DEFAULT_ZBUD
621 help
622 Selects the default allocator for the compressed cache for
623 swap pages.
624 The default is 'zbud' for compatibility, however please do
625 read the description of each of the allocators below before
626 making a right choice.
627
628 The selection made here can be overridden by using the kernel
629 command line 'zswap.zpool=' option.
630
631config ZSWAP_ZPOOL_DEFAULT_ZBUD
632 bool "zbud"
633 select ZBUD
634 help
635 Use the zbud allocator as the default allocator.
636
637config ZSWAP_ZPOOL_DEFAULT_Z3FOLD
638 bool "z3fold"
639 select Z3FOLD
640 help
641 Use the z3fold allocator as the default allocator.
642
643config ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
644 bool "zsmalloc"
645 select ZSMALLOC
646 help
647 Use the zsmalloc allocator as the default allocator.
648endchoice
649
650config ZSWAP_ZPOOL_DEFAULT
651 string
652 depends on ZSWAP
653 default "zbud" if ZSWAP_ZPOOL_DEFAULT_ZBUD
654 default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD
655 default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
656 default ""
657
658config ZSWAP_DEFAULT_ON
659 bool "Enable the compressed cache for swap pages by default"
660 depends on ZSWAP
661 help
662 If selected, the compressed cache for swap pages will be enabled
663 at boot, otherwise it will be disabled.
664
665 The selection made here can be overridden by using the kernel
666 command line 'zswap.enabled=' option.
667
552config ZPOOL
553 tristate "Common API for compressed memory storage"
554 help
555 Compressed memory storage API. This allows using either zbud or
556 zsmalloc.
557
558config ZBUD
559 tristate "Low (Up to 2x) density storage for compressed pages"

--- 190 unchanged lines hidden ---
668config ZPOOL
669 tristate "Common API for compressed memory storage"
670 help
671 Compressed memory storage API. This allows using either zbud or
672 zsmalloc.
673
674config ZBUD
675 tristate "Low (Up to 2x) density storage for compressed pages"

--- 190 unchanged lines hidden ---