Hello, I was trying to test zstd compression for zram devices with kernel 4.15
But to my surprize I found zstd comressor missing from  list of compression 
algos.

I found out this patch or equivalent was still missing in 4.15 and missing in 
4.16 as it nearing -rc1:
https://lkml.org/lkml/2017/8/4/582

[PATCH v4 5/5] crypto: Add zstd support

After manually applying this patch I can see


cat /sys/class/block/zram0/comp_algorithm
[lzo] lz4 lz4hc 842 zstd

and can change algo to zstd

If I try and mkfs.ext2 this device (with size, say, ~1Gb) - I can uncompress 
nearly full kernel tree into it (I first run out of inodes, tons of small files 
for such small "disk", re-run mkfs with specified number of inodes, around 100 
000, worked). But 1Gb device probably was visible size of device, not amount of 
memory it consumes..So, I run mkfs.btrfs over /dev/zram0 with zstd compression. 
This give me ~1Gb sized device  able to keep full kernel tree, and compile it , 
too. So, I assume it worked ....

Reply via email to