Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_radix.c
Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | |||||
* Initialize the UMA slab zone. | * Initialize the UMA slab zone. | ||||
*/ | */ | ||||
void | void | ||||
vm_radix_zinit(void) | vm_radix_zinit(void) | ||||
{ | { | ||||
vm_radix_node_zone = uma_zcreate("RADIX NODE", | vm_radix_node_zone = uma_zcreate("RADIX NODE", | ||||
sizeof(struct vm_radix_node), NULL, NULL, NULL, NULL, | sizeof(struct vm_radix_node), NULL, NULL, NULL, NULL, | ||||
VM_RADIX_PAD, UMA_ZONE_VM | UMA_ZONE_SMR | UMA_ZONE_ZINIT); | VM_RADIX_PAD, UMA_ZONE_VM | UMA_ZONE_ZINIT); | ||||
vm_radix_smr = uma_zone_get_smr(vm_radix_node_zone); | |||||
} | } | ||||
/* | |||||
* Attach SMR structures to the radix node zone. | |||||
*/ | |||||
static void | |||||
vm_radix_zinit2(void *arg __unused) | |||||
{ | |||||
vm_radix_smr = smr_create("RADIX NODE", 0, 0); | |||||
uma_zone_set_smr(vm_radix_node_zone, vm_radix_smr); | |||||
} | |||||
SYSINIT(vm_radix_zinit2, SI_SUB_SMR, SI_ORDER_ANY, vm_radix_zinit2, NULL); | |||||
/* | /* | ||||
* Inserts the key-value pair into the trie. | * Inserts the key-value pair into the trie. | ||||
* Panics if the key already exists. | * Panics if the key already exists. | ||||
*/ | */ | ||||
int | int | ||||
vm_radix_insert(struct vm_radix *rtree, vm_page_t page) | vm_radix_insert(struct vm_radix *rtree, vm_page_t page) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 523 Lines • Show Last 20 Lines |