zsmalloc: change return value unit of zs_get_total_size_bytes
authorMinchan Kim <minchan@kernel.org>
Thu, 9 Oct 2014 22:29:50 +0000 (15:29 -0700)
committerAlex Shi <alex.shi@linaro.org>
Mon, 11 May 2015 13:23:23 +0000 (21:23 +0800)
commit70a5d237c239ddde3c055784980635e39bd93885
treef1a77abc4c41e043429ba76470620d10c04b803a
parent8ccca7290fdce49995c32fc514ff8281d476e417
zsmalloc: change return value unit of zs_get_total_size_bytes

zs_get_total_size_bytes returns a amount of memory zsmalloc consumed with
*byte unit* but zsmalloc operates *page unit* rather than byte unit so
let's change the API so benefit we could get is that reduce unnecessary
overhead (ie, change page unit with byte unit) in zsmalloc.

Since return type is pages, "zs_get_total_pages" is better than
"zs_get_total_size_bytes".

Signed-off-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: Dan Streetman <ddstreet@ieee.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: <juno.choi@lge.com>
Cc: <seungho1.park@lge.com>
Cc: Luigi Semenzato <semenzato@google.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Seth Jennings <sjennings@variantweb.net>
Cc: David Horner <ds2horner@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 722cdc17232f0f684011407f7cf3c40d39457971)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
drivers/block/zram/zram_drv.c
include/linux/zsmalloc.h
mm/zsmalloc.c