[PATCH] mm/zsmalloc.c: fix comment for get_pages_per_zspage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Suggested-by: Minchan Kim <minchan@xxxxxxxxxx>
Signed-off-by: Yinghao Xie <yinghao.xie@xxxxxxxxxxx>
---
 mm/zsmalloc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 461243e..3e613cc 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -760,7 +760,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
--
1.7.9.5
��.n������g����a����&ޖ)���)��h���&������梷�����Ǟ�m������)������^�����������v���O��zf������





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]