summaryrefslogtreecommitdiffstats
path: root/drivers/staging/zsmalloc/zsmalloc-main.c
diff options
context:
space:
mode:
authorSeth Jennings2012-03-05 18:33:21 +0100
committerGreg Kroah-Hartman2012-03-07 22:31:28 +0100
commit84d4faaba27991bde9fa5ec0716d14ad279ba8ab (patch)
tree37204c7ced4ed402ec8afda0bb3eb4c5c2c082a0 /drivers/staging/zsmalloc/zsmalloc-main.c
parentstaging: zsmalloc: move object/handle masking defines (diff)
downloadkernel-qcow2-linux-84d4faaba27991bde9fa5ec0716d14ad279ba8ab.tar.gz
kernel-qcow2-linux-84d4faaba27991bde9fa5ec0716d14ad279ba8ab.tar.xz
kernel-qcow2-linux-84d4faaba27991bde9fa5ec0716d14ad279ba8ab.zip
staging: zsmalloc: add ZS_MAX_PAGES_PER_ZSPAGE
This patch moves where max_zspage_order is declared and changes its meaning. "Order" typically implies 2^order of something; however, it is currently being used as the "maximum number of single pages in a zspage". To add clarity, ZS_MAX_ZSPAGE_ORDER is now used to calculate ZS_MAX_PAGES_PER_ZSPAGE, which is 2^ZS_MAX_ZSPAGE_ORDER and is the upper bound on the number of pages in a zspage. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Acked-by: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/zsmalloc/zsmalloc-main.c')
-rw-r--r--drivers/staging/zsmalloc/zsmalloc-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c
index 240bcbff263a..09caa4f2687e 100644
--- a/drivers/staging/zsmalloc/zsmalloc-main.c
+++ b/drivers/staging/zsmalloc/zsmalloc-main.c
@@ -186,7 +186,7 @@ static int get_zspage_order(int class_size)
/* zspage order which gives maximum used size per KB */
int max_usedpc_order = 1;
- for (i = 1; i <= max_zspage_order; i++) {
+ for (i = 1; i <= ZS_MAX_PAGES_PER_ZSPAGE; i++) {
int zspage_size;
int waste, usedpc;