Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289189
b: refs/heads/master
c: 84d4faa
h: refs/heads/master
i:
  289187: 36a3381
v: v3
  • Loading branch information
Seth Jennings authored and Greg Kroah-Hartman committed Mar 7, 2012
1 parent 4f08bbf commit 43e3d9e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aafefe932a46f7d0a85b6c48e71befd1003d1e6b
refs/heads/master: 84d4faaba27991bde9fa5ec0716d14ad279ba8ab
2 changes: 1 addition & 1 deletion trunk/drivers/staging/zsmalloc/zsmalloc-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
13 changes: 7 additions & 6 deletions trunk/drivers/staging/zsmalloc/zsmalloc_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
*/
#define ZS_ALIGN 8

/*
* A single 'zspage' is composed of up to 2^N discontiguous 0-order (single)
* pages. ZS_MAX_ZSPAGE_ORDER defines upper limit on N.
*/
#define ZS_MAX_ZSPAGE_ORDER 2
#define ZS_MAX_PAGES_PER_ZSPAGE (_AC(1, UL) << ZS_MAX_ZSPAGE_ORDER)

/*
* Object location (<PFN>, <obj_idx>) is encoded as
* as single (void *) handle value.
Expand Down Expand Up @@ -58,12 +65,6 @@
#define ZS_SIZE_CLASSES ((ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE) / \
ZS_SIZE_CLASS_DELTA + 1)

/*
* A single 'zspage' is composed of N discontiguous 0-order (single) pages.
* This defines upper limit on N.
*/
static const int max_zspage_order = 4;

/*
* We do not maintain any list for completely empty or full pages
*/
Expand Down

0 comments on commit 43e3d9e

Please sign in to comment.