mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
zram: add size class equals check into recompression
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: Alexey Romanov <avromanov@sberdevices.ru> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: Minchan 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: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
f24ee92cbe
commit
7c2af309ab
@@ -55,5 +55,7 @@ void zs_unmap_object(struct zs_pool *pool, unsigned long handle);
|
||||
unsigned long zs_get_total_pages(struct zs_pool *pool);
|
||||
unsigned long zs_compact(struct zs_pool *pool);
|
||||
|
||||
unsigned int zs_lookup_class_index(struct zs_pool *pool, unsigned int size);
|
||||
|
||||
void zs_pool_stats(struct zs_pool *pool, struct zs_pool_stats *stats);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user