diff options
author | Minchan Kim <minchan@kernel.org> | 2014-10-09 15:29:50 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:26:02 -0400 |
commit | 722cdc17232f0f684011407f7cf3c40d39457971 (patch) | |
tree | 98c3cdca13c1edc8017bee617f3345e337ae3aea /include/linux/zsmalloc.h | |
parent | 13de8933c96b4557f667c337676f05274e017f83 (diff) | |
download | op-kernel-dev-722cdc17232f0f684011407f7cf3c40d39457971.zip op-kernel-dev-722cdc17232f0f684011407f7cf3c40d39457971.tar.gz |
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>
Diffstat (limited to 'include/linux/zsmalloc.h')
-rw-r--r-- | include/linux/zsmalloc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/zsmalloc.h b/include/linux/zsmalloc.h index e44d634..05c2147 100644 --- a/include/linux/zsmalloc.h +++ b/include/linux/zsmalloc.h @@ -46,6 +46,6 @@ void *zs_map_object(struct zs_pool *pool, unsigned long handle, enum zs_mapmode mm); void zs_unmap_object(struct zs_pool *pool, unsigned long handle); -u64 zs_get_total_size_bytes(struct zs_pool *pool); +unsigned long zs_get_total_pages(struct zs_pool *pool); #endif |