version 1.194, 2012/02/04 22:11:42 |
version 1.194.2.2, 2014/05/21 20:34:38 |
Line 70 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 70 __KERNEL_RCSID(0, "$NetBSD$"); |
|
* an internal pool of page headers (`phpool'). |
* an internal pool of page headers (`phpool'). |
*/ |
*/ |
|
|
/* List of all pools */ |
/* List of all pools. Non static as needed by 'vmstat -i' */ |
static TAILQ_HEAD(, pool) pool_head = TAILQ_HEAD_INITIALIZER(pool_head); |
TAILQ_HEAD(, pool) pool_head = TAILQ_HEAD_INITIALIZER(pool_head); |
|
|
/* Private pool for page header structures */ |
/* Private pool for page header structures */ |
#define PHPOOL_MAX 8 |
#define PHPOOL_MAX 8 |
|
|
pool_cache_invalidate(pool_cache_t pc) |
pool_cache_invalidate(pool_cache_t pc) |
{ |
{ |
pcg_t *full, *empty, *part; |
pcg_t *full, *empty, *part; |
#if 0 |
|
uint64_t where; |
|
|
|
if (ncpu < 2 || !mp_online) { |
/* |
/* |
* Transfer the content of the local CPU's cache back into global |
* We might be called early enough in the boot process |
* cache. Note that this does not handle objects cached for other CPUs. |
* for the CPU data structures to not be fully initialized. |
* A xcall(9) must be scheduled to take care of them. |
* In this case, simply gather the local CPU's cache now |
*/ |
* since it will be the only one running. |
pool_cache_xcall(pc); |
*/ |
|
pool_cache_xcall(pc); |
/* Invalidate the global cache. */ |
} else { |
|
/* |
|
* Gather all of the CPU-specific caches into the |
|
* global cache. |
|
*/ |
|
where = xc_broadcast(0, (xcfunc_t)pool_cache_xcall, pc, NULL); |
|
xc_wait(where); |
|
} |
|
#endif |
|
mutex_enter(&pc->pc_lock); |
mutex_enter(&pc->pc_lock); |
full = pc->pc_fullgroups; |
full = pc->pc_fullgroups; |
empty = pc->pc_emptygroups; |
empty = pc->pc_emptygroups; |