zram: add stat to gather incompressible pages since zram set up
authorMinchan Kim <minchan@kernel.org>
Tue, 15 Dec 2020 03:14:32 +0000 (19:14 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2020 20:13:47 +0000 (12:13 -0800)
commit194e28da1a0279ef6a106a5b621fd79c410432ef
tree5d79dfedf75b7bb9e6eb56d64ec34b0f70564929
parent0d8359620d9be9823b6b9b3cf2dbe006cbfec594
zram: add stat to gather incompressible pages since zram set up

Currently, zram supports the stat via /sys/block/zram/mm_stat to represent
how many of incompressible pages are stored at the moment but it couldn't
show how many times incompressible pages were wrote down since zram set
up.  It's also good indication to see how zram is effective in the system.

Link: https://lkml.kernel.org/r/20201130201907.1284910-1-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/admin-guide/blockdev/zram.rst
drivers/block/zram/zram_drv.c
drivers/block/zram/zram_drv.h