From f3ff102b867fa4bd10d2ab65b37fa60e9e2f5b57 Mon Sep 17 00:00:00 2001 From: Yinghao Xie Date: Wed, 15 Apr 2015 16:15:49 -0700 Subject: [PATCH] UPSTREAM: mm/zsmalloc.c: fix comment for get_pages_per_zspage (cherry-pick from commit 888fa374e625f3ee8f3cc2efebf52939d3bb6da1) Bug: 25951511 Change-Id: I94fc95aff6dcab3999c3dcb275ca65b8cd4b3565 Signed-off-by: Yinghao Xie Suggested-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/zsmalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index e4df4bb537af..8335e0ca6dab 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -732,7 +732,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