Re: [PATCH 1/1] lz4: Implement lz4 with dynamic offset length.

Maninder Singh
2018-04-02T06:08:00Z

Hi,

>> diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
>> index 4ed0a78..5bc5aab 100644
>> --- a/drivers/block/zram/zcomp.c
>> +++ b/drivers/block/zram/zcomp.c
>> @@ -17,11 +17,15 @@
>> #include <linux/crypto.h>
>>
>> #include "zcomp.h"
>> +#define KB (1 << 10)
>>
>> static const char * const backends[] = {
>> "lzo",
>> #if IS_ENABLED(CONFIG_CRYPTO_LZ4)
>> "lz4",
>> +#if (PAGE_SIZE < (32 * KB))
>> + "lz4_dyn",
>> +#endif
>
>This is not the list of supported algorithms. It's the list of
>recommended algorithms. You can configure zram to use any of
>available and known to Crypto API algorithms. Including lz4_dyn
>on PAGE_SIZE > 32K systems.
>
> -ss

Yes, we want to integrate new compression(lz4_dyn) for ZRAM
only if PAGE_SIZE is less than 32KB to get maximum benefit.
so we added lz4_dyn to available list of ZRAM compression alhorithms.

Thanks,
Manider Singh