Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_page.c
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | for (i = 0; i < vm_ndomains; i++) { | ||||
* Don't allow the page cache to take up more than .25% of | * Don't allow the page cache to take up more than .25% of | ||||
* memory. | * memory. | ||||
*/ | */ | ||||
if (vmd->vmd_page_count / 400 < 256 * mp_ncpus) | if (vmd->vmd_page_count / 400 < 256 * mp_ncpus) | ||||
continue; | continue; | ||||
vmd->vmd_pgcache = uma_zcache_create("vm pgcache", | vmd->vmd_pgcache = uma_zcache_create("vm pgcache", | ||||
sizeof(struct vm_page), NULL, NULL, NULL, NULL, | sizeof(struct vm_page), NULL, NULL, NULL, NULL, | ||||
vm_page_import, vm_page_release, vmd, | vm_page_import, vm_page_release, vmd, | ||||
UMA_ZONE_NOBUCKETCACHE | UMA_ZONE_MAXBUCKET | UMA_ZONE_VM); | UMA_ZONE_MAXBUCKET | UMA_ZONE_VM); | ||||
(void )uma_zone_set_maxcache(vmd->vmd_pgcache, 0); | |||||
} | } | ||||
} | } | ||||
SYSINIT(vm_page2, SI_SUB_VM_CONF, SI_ORDER_ANY, vm_page_init_cache_zones, NULL); | SYSINIT(vm_page2, SI_SUB_VM_CONF, SI_ORDER_ANY, vm_page_init_cache_zones, NULL); | ||||
/* Make sure that u_long is at least 64 bits when PAGE_SIZE is 32K. */ | /* Make sure that u_long is at least 64 bits when PAGE_SIZE is 32K. */ | ||||
#if PAGE_SIZE == 32768 | #if PAGE_SIZE == 32768 | ||||
#ifdef CTASSERT | #ifdef CTASSERT | ||||
CTASSERT(sizeof(u_long) >= 8); | CTASSERT(sizeof(u_long) >= 8); | ||||
▲ Show 20 Lines • Show All 4,288 Lines • Show Last 20 Lines |