| version 1.137.2.1, 2007/12/08 17:57:46 |
version 1.137.2.2, 2007/12/12 22:03:31 |
| Line 77 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| Line 77 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| /* List of all pools */ |
/* List of all pools */ |
| LIST_HEAD(,pool) pool_head = LIST_HEAD_INITIALIZER(pool_head); |
LIST_HEAD(,pool) pool_head = LIST_HEAD_INITIALIZER(pool_head); |
| |
|
| /* List of all caches. */ |
|
| LIST_HEAD(,pool_cache) pool_cache_head = |
|
| LIST_HEAD_INITIALIZER(pool_cache_head); |
|
| |
|
| /* Private pool for page header structures */ |
/* Private pool for page header structures */ |
| #define PHPOOL_MAX 8 |
#define PHPOOL_MAX 8 |
| static struct pool phpool[PHPOOL_MAX]; |
static struct pool phpool[PHPOOL_MAX]; |
| Line 185 static struct pool pcgpool; |
|
| Line 181 static struct pool pcgpool; |
|
| static struct pool cache_pool; |
static struct pool cache_pool; |
| static struct pool cache_cpu_pool; |
static struct pool cache_cpu_pool; |
| |
|
| |
/* List of all caches. */ |
| |
LIST_HEAD(,pool_cache) pool_cache_head = |
| |
LIST_HEAD_INITIALIZER(pool_cache_head); |
| |
|
| |
int pool_cache_disable; |
| |
|
| |
|
| static pool_cache_cpu_t *pool_cache_put_slow(pool_cache_cpu_t *, int *, |
static pool_cache_cpu_t *pool_cache_put_slow(pool_cache_cpu_t *, int *, |
| void *, paddr_t); |
void *, paddr_t); |
| static pool_cache_cpu_t *pool_cache_get_slow(pool_cache_cpu_t *, int *, |
static pool_cache_cpu_t *pool_cache_get_slow(pool_cache_cpu_t *, int *, |
| Line 2590 pool_cache_put_slow(pool_cache_cpu_t *cc |
|
| Line 2593 pool_cache_put_slow(pool_cache_cpu_t *cc |
|
| * If we can't allocate a new group, just throw the |
* If we can't allocate a new group, just throw the |
| * object away. |
* object away. |
| */ |
*/ |
| pcg = pool_get(&pcgpool, PR_NOWAIT); |
if (pool_cache_disable) { |
| |
pcg = NULL; |
| |
} else { |
| |
pcg = pool_get(&pcgpool, PR_NOWAIT); |
| |
} |
| if (pcg == NULL) { |
if (pcg == NULL) { |
| pool_cache_destruct_object(pc, object); |
pool_cache_destruct_object(pc, object); |
| return NULL; |
return NULL; |