summaryrefslogtreecommitdiffstats
path: root/mm/zsmalloc.c
diff options
context:
space:
mode:
authorGanesh Mahendran <opensource.ganesh@gmail.com>2016-07-28 18:47:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-28 19:07:41 -0400
commitfd8544639e3fdc0196707ffb57b90a48a8948647 (patch)
tree268d0b7a43fc26559c0209df74abdd61840c1173 /mm/zsmalloc.c
parent64d90465f01325653deb8503aec4ca48ca3e9580 (diff)
mm/zsmalloc: keep comments consistent with code
Some minor commebnt changes: 1). update zs_malloc(),zs_create_pool() function header 2). update "Usage of struct page fields" Link: http://lkml.kernel.org/r/1467882338-4300-5-git-send-email-opensource.ganesh@gmail.com Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/zsmalloc.c')
-rw-r--r--mm/zsmalloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 1ce774503fa1..acfdf69184a7 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -20,6 +20,7 @@
20 * page->freelist(index): links together all component pages of a zspage 20 * page->freelist(index): links together all component pages of a zspage
21 * For the huge page, this is always 0, so we use this field 21 * For the huge page, this is always 0, so we use this field
22 * to store handle. 22 * to store handle.
23 * page->units: first object offset in a subpage of zspage
23 * 24 *
24 * Usage of struct page flags: 25 * Usage of struct page flags:
25 * PG_private: identifies the first component page 26 * PG_private: identifies the first component page
@@ -137,9 +138,6 @@
137 */ 138 */
138#define ZS_SIZE_CLASS_DELTA (PAGE_SIZE >> CLASS_BITS) 139#define ZS_SIZE_CLASS_DELTA (PAGE_SIZE >> CLASS_BITS)
139 140
140/*
141 * We do not maintain any list for completely empty or full pages
142 */
143enum fullness_group { 141enum fullness_group {
144 ZS_EMPTY, 142 ZS_EMPTY,
145 ZS_ALMOST_EMPTY, 143 ZS_ALMOST_EMPTY,
@@ -1532,6 +1530,7 @@ static unsigned long obj_malloc(struct size_class *class,
1532 * zs_malloc - Allocate block of given size from pool. 1530 * zs_malloc - Allocate block of given size from pool.
1533 * @pool: pool to allocate from 1531 * @pool: pool to allocate from
1534 * @size: size of block to allocate 1532 * @size: size of block to allocate
1533 * @gfp: gfp flags when allocating object
1535 * 1534 *
1536 * On success, handle to the allocated object is returned, 1535 * On success, handle to the allocated object is returned,
1537 * otherwise 0. 1536 * otherwise 0.
@@ -2391,7 +2390,7 @@ static int zs_register_shrinker(struct zs_pool *pool)
2391 2390
2392/** 2391/**
2393 * zs_create_pool - Creates an allocation pool to work from. 2392 * zs_create_pool - Creates an allocation pool to work from.
2394 * @flags: allocation flags used to allocate pool metadata 2393 * @name: pool name to be created
2395 * 2394 *
2396 * This function must be called before anything when using 2395 * This function must be called before anything when using
2397 * the zsmalloc allocator. 2396 * the zsmalloc allocator.