Rev 1888 | Rev 1950 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1888 | Rev 1941 | ||
|---|---|---|---|
| Line 54... | Line 54... | ||
| 54 | 54 | ||
| 55 | /** Maximum wasted space we allow for cache */ |
55 | /** Maximum wasted space we allow for cache */ |
| 56 | #define SLAB_MAX_BADNESS(cache) ((PAGE_SIZE << (cache)->order) >> 2) |
56 | #define SLAB_MAX_BADNESS(cache) ((PAGE_SIZE << (cache)->order) >> 2) |
| 57 | 57 | ||
| 58 | /* slab_reclaim constants */ |
58 | /* slab_reclaim constants */ |
| 59 | #define SLAB_RECLAIM_ALL 0x1 /**< Reclaim all possible memory, because |
59 | #define SLAB_RECLAIM_ALL 0x1 /**< Reclaim all possible memory, because we are in memory stress */ |
| 60 | * we are in memory stress */ |
- | |
| 61 | 60 | ||
| 62 | /* cache_create flags */ |
61 | /* cache_create flags */ |
| 63 | #define SLAB_CACHE_NOMAGAZINE 0x1 /**< Do not use per-cpu cache */ |
62 | #define SLAB_CACHE_NOMAGAZINE 0x1 /**< Do not use per-cpu cache */ |
| 64 | #define SLAB_CACHE_SLINSIDE 0x2 /**< Have control structure inside SLAB */ |
63 | #define SLAB_CACHE_SLINSIDE 0x2 /**< Have control structure inside SLAB */ |
| 65 | /** We add magazine cache later, if we have this flag */ |
- | |
| 66 | #define SLAB_CACHE_MAGDEFERRED (0x4 | SLAB_CACHE_NOMAGAZINE) |
64 | #define SLAB_CACHE_MAGDEFERRED (0x4 | SLAB_CACHE_NOMAGAZINE) /**< We add magazine cache later, if we have this flag */ |
| 67 | 65 | ||
| 68 | typedef struct { |
66 | typedef struct { |
| 69 | link_t link; |
67 | link_t link; |
| 70 | count_t busy; /**< Count of full slots in magazine */ |
68 | count_t busy; /**< Count of full slots in magazine */ |
| 71 | count_t size; /**< Number of slots in magazine */ |
69 | count_t size; /**< Number of slots in magazine */ |