block: zram: Add support for dynamic compressor switch
authorDongwoo Lee <dwoo08.lee@samsung.com>
Thu, 4 Jun 2020 04:54:35 +0000 (13:54 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 6 Jul 2020 09:09:48 +0000 (18:09 +0900)
commit2aab8469d74ff27ed1796377505a01f60fb5626c
tree31600d1e323a9050a91579659707f6ffc20fb069
parentf50de597dd9b4f84f6c41cec644c6dcad147e67a
block: zram: Add support for dynamic compressor switch

Orginally, the compression algorithm cannot be changed until
resetting it if zram is once initialized by setting disksize. Since
this, however, zram can have multiple compressor and switch them
dynamically.

With this, zram uses the algorithm which is fast but has low
compression ratio at first, and can change to the one that is slightly
slower but having higher ratio when the target get bothered by low
memory.

Change-Id: I3fd817e299a76284b8b28e318a4822107e6a5f6d
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
drivers/block/zram/zcomp.c
drivers/block/zram/zcomp.h
drivers/block/zram/zram_drv.c
drivers/block/zram/zram_drv.h