linux/drivers/block/zram
Alexey Romanov 641608f362 zram: don't retry compress incompressible page
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.

Link: https://lkml.kernel.org/r/20220824113117.78849-1-avromanov@sberdevices.ru
Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru>
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Alexey Romanov <avromanov@sberdevices.ru>
Cc: Dmitry Rokosov <DDRokosov@sberdevices.ru>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-09-11 20:26:02 -07:00
..
Kconfig zram: fix Kconfig dependency warning 2022-05-25 10:47:47 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
zcomp.c zram: do not lookup algorithm in backends table 2022-07-03 18:08:50 -07:00
zcomp.h zram: Use local lock to protect per-CPU data 2020-05-28 10:31:10 +02:00
zram_drv.c zram: don't retry compress incompressible page 2022-09-11 20:26:02 -07:00
zram_drv.h Revert "zram: remove double compression logic" 2022-08-20 15:17:44 -07:00