]> git.karo-electronics.de Git - karo-tx-linux.git/commit
zram: use generic start/end io accounting
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Tue, 7 Apr 2015 23:44:48 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:48 +0000 (09:44 +1000)
commit38182c566e98739a23a5ac286c691bcdfb2f8640
tree8d8773d7a0353e5cfb2cf37bbd4bb98d0b4155d1
parent4ec6b57076d5e9c302a56834d83b5aff3e514148
zram: use generic start/end io accounting

Use bio generic_start_io_acct() and generic_end_io_acct() to account
device's block layer statistics.  This will let users to monitor zram
activities using sysstat and similar packages/tools.

Apart from the usual per-stat sysfs attr, zram IO stats are now also
available in '/sys/block/zram<id>/stat' and '/proc/diskstats' files.

We will slowly get rid of per-stat sysfs files.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c