Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235844
b: refs/heads/master
c: f3bc232
h: refs/heads/master
v: v3
  • Loading branch information
Robert Jennings authored and Greg Kroah-Hartman committed Feb 4, 2011
1 parent b7901b2 commit 44bf5d2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: 49ba9d2d1c6d5523ee4e9e5b31dd89445727a977
refs/heads/master: f3bc232c2eb1dac5ac3dbaca0099ce51a615a478
16 changes: 14 additions & 2 deletions trunk/drivers/staging/zram/xvmalloc_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,28 @@
/* User configurable params */

/* Must be power of two */
#ifdef CONFIG_64BIT
#define XV_ALIGN_SHIFT 3
#else
#define XV_ALIGN_SHIFT 2
#endif
#define XV_ALIGN (1 << XV_ALIGN_SHIFT)
#define XV_ALIGN_MASK (XV_ALIGN - 1)

/* This must be greater than sizeof(link_free) */
#define XV_MIN_ALLOC_SIZE 32
#define XV_MAX_ALLOC_SIZE (PAGE_SIZE - XV_ALIGN)

/* Free lists are separated by FL_DELTA bytes */
#define FL_DELTA_SHIFT 3
/*
* Free lists are separated by FL_DELTA bytes
* This value is 3 for 4k pages and 4 for 64k pages, for any
* other page size, a conservative (PAGE_SHIFT - 9) is used.
*/
#if PAGE_SHIFT == 16
#define FL_DELTA_SHIFT 4
#else
#define FL_DELTA_SHIFT (PAGE_SHIFT - 9)
#endif
#define FL_DELTA (1 << FL_DELTA_SHIFT)
#define FL_DELTA_MASK (FL_DELTA - 1)
#define NUM_FREE_LISTS ((XV_MAX_ALLOC_SIZE - XV_MIN_ALLOC_SIZE) \
Expand Down

0 comments on commit 44bf5d2

Please sign in to comment.