Skip to content

Commit 888fa37

Browse files
Yinghao Xietorvalds
authored andcommitted
mm/zsmalloc.c: fix comment for get_pages_per_zspage
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>
1 parent d02be50 commit 888fa37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mm/zsmalloc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,8 @@ static enum fullness_group fix_fullness_group(struct size_class *class,
731731
* to form a zspage for each size class. This is important
732732
* to reduce wastage due to unusable space left at end of
733733
* each zspage which is given as:
734-
* wastage = Zp - Zp % size_class
734+
* wastage = Zp % class_size
735+
* usage = Zp - wastage
735736
* where Zp = zspage size = k * PAGE_SIZE where k = 1, 2, ...
736737
*
737738
* For example, for size class of 3/8 * PAGE_SIZE, we should

0 commit comments

Comments
 (0)