[RFC PATCH v2] jffs2: add support for zstd compression

Rui Salvaterra rsalvaterra at gmail.com
Mon Apr 26 09:49:18 BST 2021


Hi, David,

On Mon, 26 Apr 2021 at 09:24, David Woodhouse <dwmw2 at infradead.org> wrote:
>
> On Thu, 2021-03-25 at 14:47 +0000, Rui Salvaterra wrote:
> > Friendly ping (and also cc'ing dwmw2).
> >
> > On Tue, 16 Mar 2021 at 14:19, Rui Salvaterra <rsalvaterra at gmail.com> wrote:
> > >
> > > Implement support for zstd compression in jffs2 at the default compression
> > > level (3).
> > >
> > > Lightly tested in OpenWrt, on a single CPU embedded MIPS32 system (AirGrid M2).
>
> Seems reasonable. Do you have the corresponding addition for mkfs.jffs2
> and can you report the boot time / image sizes with it vs. zlib on a
> typical platform?

I haven't done any changes to userspace, other than OpenWrt's fstools
(to force-enable zstd compression at mount time, with compr=zstd).

> And if it doesn't make a difference to boot time or image size... why
> are we doing it?

In OpenWrt, we're carrying an enormous patch [1] which enables lzma
compression in (and only in) jffs2. Having a single compression
algorithm with good all-around performance, usable by other subsystems
(e.g. zram, ubifs) would allow us to disable other redundant
algorithms and consequently reduce the total image size (I measured an
increase of nearly 200 kB by the lzma patch alone).

[1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch;h=1bccb30a69f69ff8e2e70a747b1f3b25d1079c8f;hb=HEAD



More information about the linux-mtd mailing list