zram: add free space management in backing device
authorMinchan Kim <minchan@kernel.org>
Wed, 6 Sep 2017 23:19:57 +0000 (16:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 00:27:25 +0000 (17:27 -0700)
commit1363d4662a0d28dfdb81ef426c88c9a8dbf7c338
treee71f4440fb9101ed4c805016df6ff73671dc2fff
parent013bf95a83ec760a2afc37fabd6bf13a9cdae205
zram: add free space management in backing device

With backing device, zram needs management of free space of backing
device.

This patch adds bitmap logic to manage free space which is very naive.
However, it would be simple enough as considering uncompressible pages's
frequenty in zram.

Link: http://lkml.kernel.org/r/1498459987-24562-6-git-send-email-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Juneho Choi <juno.choi@lge.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/zram/zram_drv.c
drivers/block/zram/zram_drv.h