zram-swap: default to lzo instead of lzo-rle compression

Rui Salvaterra rsalvaterra at gmail.com
Mon Nov 29 01:57:37 PST 2021


Hi, Sven,

On Sun, 28 Nov 2021 at 01:40, Sven Roederer <devel-sven at geroedel.de> wrote:
>
> Rui, not sure if to call it a bug. At the end there is a hardcoded default
> algo in the module, that is used initially when creating the device. The check
> for the valid algo is done later at device-activation.
> I spend some time in this code and have a patch ready, which checks for algos
> before announcing them.

It's not a bug, but it's also not exactly an unsurprising behaviour.
This is the real issue:

https://elixir.bootlin.com/linux/v5.10.82/source/crypto/Makefile#L153

obj-$(CONFIG_CRYPTO_LZO) += lzo.o lzo-rle.o

Even though they're built as separate modules, they depend on a single
kconfig symbol. Moreover, lzo-rle uses most of the original lzo
functions (adding just RLE on top), so they should arguably just be
merged. I don't know how receptive upstream is to that idea, but it
seems logical to me.

Thanks,
Rui



More information about the openwrt-devel mailing list