Commit 851355d9 authored by Alexey Romanov's avatar Alexey Romanov Committed by Jinjiang Tu
Browse files

zram: add size class equals check into recompression

mainline inclusion
from mainline-v6.2-rc1
commit 7c2af309
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I7TWVA
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7c2af309abd24ff4e313246bf9b68f398d95c871

-------------------------------------------

It makes no sense for us to recompress the object if it will be in the
same size class.  We anyway don't get any memory gain.  But, at the same
time, we get a CPU time overhead when inserting this object into zspage
and decompressing it afterwards.

[senozhatsky: rebased and fixed conflicts]
Link: https://lkml.kernel.org/r/20221109115047.2921851-9-senozhatsky@chromium.org


Signed-off-by: default avatarAlexey Romanov <avromanov@sberdevices.ru>
Signed-off-by: default avatarSergey Senozhatsky <senozhatsky@chromium.org>
Acked-by: default avatarMinchan Kim <minchan@kernel.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Suleiman Souhlal <suleiman@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJinjiang Tu <tujinjiang@huawei.com>
parent 54b2a388
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment