Re: [PATCH v2] zram: don't retry compress incompressible page

From: Sergey Senozhatsky
Date: Thu Aug 25 2022 - 03:58:39 EST


On (22/08/24 14:31), Alexey Romanov wrote:
> It doesn't make sense for us to retry to compress an uncompressible
> page (comp_len == PAGE_SIZE) in zsmalloc slowpath, because we will
> be storing it uncompressed anyway. We can avoid wasting time on
> another compression attempt. It is enough to take lock
> (zcomp_stream_get) and execute the code below.
>
> Signed-off-by: Alexey Romanov <avromanov@xxxxxxxxxxxxxx>
> Signed-off-by: Dmitry Rokosov <ddrokosov@xxxxxxxxxxxxxx>

Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>