Re: [PATCHv3 4/8] zram: Introduce recompress sysfs knob

From: Sergey Senozhatsky
Date: Mon Oct 17 2022 - 22:12:55 EST


On (22/10/17 17:08), Andrew Morton wrote:
> > Allow zram to recompress (using secondary compression streams)
> > pages. We support three modes:
> >
> > 1) IDLE pages recompression is activated by `idle` mode
> >
> > echo idle > /sys/block/zram0/recompress
> >
> > 2) Since there may be many idle pages user-space may pass a size
> > watermark value and we will recompress IDLE pages only of equal
> > or greater size:
> >
> > echo 888 > /sys/block/zram0/recompress
>
> It's helpful to describe the units ("bytes") here and in the
> docmentation.

Will send fixup patches.

> > 3) HUGE pages recompression is activated by `huge` mode
> >
> > echo huge > /sys/block/zram0/recompress
> >
> > 4) HUGE_IDLE pages recompression is activated by `huge_idle` mode
> >
> > echo huge_idle > /sys/block/zram0/recompress
> >
> > ...
> >
> > + if (IS_ERR((void *)handle_next)) {
>
> IS_ERR_VALUE() avoids castsing back and forth.

Thanks, I'll send a separate patch for this (if you don't mind).