diff options
| author | Sergey Senozhatsky <senozhatsky@chromium.org> | 2022-11-09 20:50:44 +0900 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2022-11-30 15:58:52 -0800 |
| commit | a55cf9648d3de486ccf0eca980a02f0faff8ec45 (patch) | |
| tree | 91e67a0859d5a323c0c9158b8728116bf9cee7df /Documentation/admin-guide | |
| parent | zram: remove redundant checks from zram_recompress() (diff) | |
| download | linux-a55cf9648d3de486ccf0eca980a02f0faff8ec45.tar.gz linux-a55cf9648d3de486ccf0eca980a02f0faff8ec45.zip | |
zram: add algo parameter support to zram_recompress()
Recompression iterates through all the registered secondary compression
algorithms in order of their priorities so that we have higher chances of
finding the algorithm that compresses a particular page. This, however,
may not always be best approach and sometimes we may want to limit
recompression to only one particular algorithm. For instance, when a
higher priority algorithm uses too much power and device has a relatively
low battery level we may want to limit recompression to use only a lower
priority algorithm, which uses less power.
Introduce algo= parameter support to recompression sysfs knob so that
user-sapce can request recompression with particular algorithm only:
echo "type=idle algo=zstd" > /sys/block/zramX/recompress
Link: https://lkml.kernel.org/r/20221109115047.2921851-11-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Alexey Romanov <avromanov@sberdevices.ru>
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>
Diffstat (limited to 'Documentation/admin-guide')
0 files changed, 0 insertions, 0 deletions
