diff options
author | Alexey Romanov <avromanov@sberdevices.ru> | 2022-08-24 14:31:17 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-09-11 20:26:02 -0700 |
commit | 641608f36244eb01028c2b30a961c7242144d96a (patch) | |
tree | 0545a56dc525718416c0a4fd4c3e85af39b6fe68 /fs/btrfs/ioctl.c | |
parent | 3083da7bcf56a4922b996ea3551847488a43a8b6 (diff) | |
download | linux-641608f36244eb01028c2b30a961c7242144d96a.tar.gz linux-641608f36244eb01028c2b30a961c7242144d96a.tar.bz2 linux-641608f36244eb01028c2b30a961c7242144d96a.zip |
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>
Diffstat (limited to 'fs/btrfs/ioctl.c')
0 files changed, 0 insertions, 0 deletions