aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYinghao Xie <yinghao.xie@samsung.com>2015-04-15 16:15:49 -0700
committerGreg Hackmann <ghackmann@google.com>2015-12-09 11:13:14 -0800
commitb67c3a0a5a4622b8538c8ff4cecc4c4dd5ed5a17 (patch)
tree72da8623f675c94d95c94edcd9c7e8266c80c826
parent623b6e63f96cd6f8a143f851c5eb4244a39f1aa6 (diff)
UPSTREAM: mm/zsmalloc.c: fix comment for get_pages_per_zspage
(cherry-pick from commit 888fa374e625f3ee8f3cc2efebf52939d3bb6da1) Signed-off-by: Yinghao Xie <yinghao.xie@sumsung.com> Suggested-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Bug: 25951511 Change-Id: I575b54fd6da328eb982b5e92e1b2e983985d7019
-rw-r--r--mm/zsmalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 1833fc9e09cb..7a48e5568d46 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -731,7 +731,8 @@ out:
* to form a zspage for each size class. This is important
* to reduce wastage due to unusable space left at end of
* each zspage which is given as:
- * wastage = Zp - Zp % size_class
+ * wastage = Zp % class_size
+ * usage = Zp - wastage
* where Zp = zspage size = k * PAGE_SIZE where k = 1, 2, ...
*
* For example, for size class of 3/8 * PAGE_SIZE, we should