Skip to content

Commit

Permalink
configs: Enable more ZRAM backends
Browse files Browse the repository at this point in the history
6.12 kernel reworked how ZRAM backends were configured.
Let's enable the ones we've lost.

I've chosen zstd as the default.

6.6 kernel supported:
$ cat /sys/block/zram0/comp_algorithm
[lzo-rle] lzo lz4 zstd

6.12 currently supports:
$ cat /sys/block/zram0/comp_algorithm
[lzo-rle] lzo

With this PR 6.12 supports:
$ cat /sys/block/zram0/comp_algorithm
lzo-rle lzo lz4 [zstd]

See: https://forums.raspberrypi.com/viewtopic.php?p=2296678#p2296678

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
  • Loading branch information
popcornmix committed Feb 21, 2025
1 parent 32bcc01 commit 60e5cbd
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ CONFIG_MTD_SPI_NOR=m
CONFIG_MTD_UBI=m
CONFIG_OF_CONFIGFS=y
CONFIG_ZRAM=m
CONFIG_ZRAM_BACKEND_LZ4=y
CONFIG_ZRAM_BACKEND_ZSTD=y
CONFIG_ZRAM_BACKEND_LZO=y
CONFIG_ZRAM_DEF_COMP_ZSTD=y
CONFIG_ZRAM_WRITEBACK=y
CONFIG_ZRAM_MULTI_COMP=y
CONFIG_BLK_DEV_LOOP=y
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,10 @@ CONFIG_MTD_SPI_NOR=m
CONFIG_MTD_UBI=m
CONFIG_OF_CONFIGFS=y
CONFIG_ZRAM=m
CONFIG_ZRAM_BACKEND_LZ4=y
CONFIG_ZRAM_BACKEND_ZSTD=y
CONFIG_ZRAM_BACKEND_LZO=y
CONFIG_ZRAM_DEF_COMP_ZSTD=y
CONFIG_ZRAM_WRITEBACK=y
CONFIG_ZRAM_MULTI_COMP=y
CONFIG_BLK_DEV_LOOP=y
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ CONFIG_MTD_SPI_NOR=m
CONFIG_MTD_UBI=m
CONFIG_OF_CONFIGFS=y
CONFIG_ZRAM=m
CONFIG_ZRAM_BACKEND_LZ4=y
CONFIG_ZRAM_BACKEND_ZSTD=y
CONFIG_ZRAM_BACKEND_LZO=y
CONFIG_ZRAM_DEF_COMP_ZSTD=y
CONFIG_ZRAM_WRITEBACK=y
CONFIG_ZRAM_MULTI_COMP=y
CONFIG_BLK_DEV_LOOP=y
Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ CONFIG_MTD_SPI_NOR=m
CONFIG_MTD_UBI=m
CONFIG_OF_CONFIGFS=y
CONFIG_ZRAM=m
CONFIG_ZRAM_BACKEND_LZ4=y
CONFIG_ZRAM_BACKEND_ZSTD=y
CONFIG_ZRAM_BACKEND_LZO=y
CONFIG_ZRAM_DEF_COMP_ZSTD=y
CONFIG_ZRAM_WRITEBACK=y
CONFIG_ZRAM_MULTI_COMP=y
CONFIG_BLK_DEV_LOOP=y
Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/configs/bcm2712_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@ CONFIG_MTD_SPI_NOR=m
CONFIG_MTD_UBI=m
CONFIG_OF_CONFIGFS=y
CONFIG_ZRAM=m
CONFIG_ZRAM_BACKEND_LZ4=y
CONFIG_ZRAM_BACKEND_ZSTD=y
CONFIG_ZRAM_BACKEND_LZO=y
CONFIG_ZRAM_DEF_COMP_ZSTD=y
CONFIG_ZRAM_WRITEBACK=y
CONFIG_ZRAM_MULTI_COMP=y
CONFIG_BLK_DEV_LOOP=y
Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/configs/bcmrpi3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ CONFIG_MTD_SPI_NAND=m
CONFIG_MTD_UBI=m
CONFIG_OF_CONFIGFS=y
CONFIG_ZRAM=m
CONFIG_ZRAM_BACKEND_LZ4=y
CONFIG_ZRAM_BACKEND_ZSTD=y
CONFIG_ZRAM_BACKEND_LZO=y
CONFIG_ZRAM_DEF_COMP_ZSTD=y
CONFIG_ZRAM_WRITEBACK=y
CONFIG_ZRAM_MULTI_COMP=y
CONFIG_BLK_DEV_LOOP=y
Expand Down

0 comments on commit 60e5cbd

Please sign in to comment.