zram: add max_pages param to recompression
authorSergey Senozhatsky <senozhatsky@chromium.org>
Fri, 29 Mar 2024 09:39:41 +0000 (18:39 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Apr 2024 03:56:30 +0000 (20:56 -0700)
commit34efe1c3b688944d9817a5faaab7aad870182c59
tree4fe669a824efd2bd77bef4fd225a2abaa7baaba9
parentba42b524a0408b5f92bd41edaee1ea84309ab9ae
zram: add max_pages param to recompression

Introduce "max_pages" param to recompress device attribute which sets an
upper limit on the number of entries (pages) zram attempts to recompress
(in this particular recompression call).  S/W recompression can be quite
expensive so limiting the number of pages recompress touches can be quite
helpful.

Link: https://lkml.kernel.org/r/20240329094050.2815699-1-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Acked-by: Brian Geffon <bgeffon@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/admin-guide/blockdev/zram.rst
drivers/block/zram/zram_drv.c