Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add zram and zswap to the kernel config/build #19

Open
mbohun opened this issue Sep 5, 2023 · 0 comments
Open

Please add zram and zswap to the kernel config/build #19

mbohun opened this issue Sep 5, 2023 · 0 comments

Comments

@mbohun
Copy link

mbohun commented Sep 5, 2023

NO zram or zswap at the moment

pinetabv:~$ uname -a
Linux pinetabv 5.15.128 #1 SMP Mon Aug 28 15:27:08 UTC 2023 riscv64 riscv64 riscv64 GNU/Linux
pinetabv:~$ zcat /proc/config.gz | grep -i zram
pinetabv:~$ zcat /proc/config.gz | grep -i zswap              
pinetabv:~$ 
CONFIG_ZRAM: Compressed RAM block device support
General informations
The Linux kernel configuration item CONFIG_ZRAM has multiple definitions:

Compressed RAM block device support found in drivers/block/zram/Kconfig
The configuration item CONFIG_ZRAM:

prompt: Compressed RAM block device support
type: tristate
depends on: ( CONFIG_BLOCK && CONFIG_SYSFS && CONFIG_MMU ) && ( CONFIG_CRYPTO_LZO || CONFIG_CRYPTO_ZSTD || CONFIG_CRYPTO_LZ4 || CONFIG_CRYPTO_LZ4HC || CONFIG_CRYPTO_842 )
defined in drivers/block/zram/Kconfig
found in Linux kernels: 3.14–3.19, 4.0–4.20, 5.0–5.19, 6.0–6.5
modules built: zram, zram

Unfortunately none of the ( CONFIG_CRYPTO_LZO || CONFIG_CRYPTO_ZSTD || CONFIG_CRYPTO_LZ4 || CONFIG_CRYPTO_LZ4HC || CONFIG_CRYPTO_842 ) is enabled at the moment:

pinetabv:~$ zcat /proc/config.gz | grep -i config_crypto_lzo
# CONFIG_CRYPTO_LZO is not set
pinetabv:~$ zcat /proc/config.gz | grep -i config_crypto_zstd
# CONFIG_CRYPTO_ZSTD is not set
pinetabv:~$ zcat /proc/config.gz | grep -i config_crypto_lz4 
# CONFIG_CRYPTO_LZ4 is not set
# CONFIG_CRYPTO_LZ4HC is not set
pinetabv:~$ zcat /proc/config.gz | grep -i config_crypto_lz4hc
# CONFIG_CRYPTO_LZ4HC is not set
pinetabv:~$ zcat /proc/config.gz | grep -i config_crypto_842  
# CONFIG_CRYPTO_842 is not set

Please enable: CONFIG_CRYPTO_LZO, CONFIG_CRYPTO_ZSTD, CONFIG_CRYPTO_LZ4, CONFIG_CRYPTO_LZ4HC, CONFIG_CRYPTO_842 in the kernel config, and that in turn should make available CONFIG_ZRAM and then set CONFIG_ZRAM=y.

Here is an example from PineTab2 /proc/config.gz for reference:

[root@danctnix mbohun]# zcat /proc/config.gz | grep -i zram
CONFIG_ZRAM=y
# CONFIG_ZRAM_DEF_COMP_LZORLE is not set
CONFIG_ZRAM_DEF_COMP_ZSTD=y
# CONFIG_ZRAM_DEF_COMP_LZ4 is not set
# CONFIG_ZRAM_DEF_COMP_LZO is not set
# CONFIG_ZRAM_DEF_COMP_LZ4HC is not set
CONFIG_ZRAM_DEF_COMP="zstd"
CONFIG_ZRAM_WRITEBACK=y
CONFIG_ZRAM_MEMORY_TRACKING=y
CONFIG_ZRAM_MULTI_COMP=y
[root@danctnix mbohun]# zcat /proc/config.gz | grep -i zswap
CONFIG_ZSWAP=y
CONFIG_ZSWAP_DEFAULT_ON=y
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_DEFLATE is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZO is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_842 is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4 is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4HC is not set
CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD=y
CONFIG_ZSWAP_COMPRESSOR_DEFAULT="zstd"
# CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD is not set
# CONFIG_ZSWAP_ZPOOL_DEFAULT_Z3FOLD is not set
CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y
CONFIG_ZSWAP_ZPOOL_DEFAULT="zsmalloc"
[root@danctnix mbohun]# zcat /proc/config.gz | grep -i config_crypto_zs
CONFIG_CRYPTO_ZSTD=y
[root@danctnix mbohun]# zcat /proc/config.gz | grep -i config_crypto_lzo
CONFIG_CRYPTO_LZO=y
[root@danctnix mbohun]# zcat /proc/config.gz | grep -i config_crypto_zstd
CONFIG_CRYPTO_ZSTD=y
[root@danctnix mbohun]# zcat /proc/config.gz | grep -i config_crypto_lz4
CONFIG_CRYPTO_LZ4=y
CONFIG_CRYPTO_LZ4HC=m
[root@danctnix mbohun]# zcat /proc/config.gz | grep -i config_crypto_lz4hc
CONFIG_CRYPTO_LZ4HC=m
[root@danctnix mbohun]# zcat /proc/config.gz | grep -i config_crypto_842
# CONFIG_CRYPTO_842 is not set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant