Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_radix.c
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
#include "opt_ddb.h" | #include "opt_ddb.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/vmmeter.h> | #include <sys/vmmeter.h> | ||||
#include <sys/smr.h> | #include <sys/smr.h> | ||||
#include <sys/smr_types.h> | |||||
#include <vm/uma.h> | #include <vm/uma.h> | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/vm_param.h> | #include <vm/vm_param.h> | ||||
#include <vm/vm_object.h> | #include <vm/vm_object.h> | ||||
#include <vm/vm_page.h> | #include <vm/vm_page.h> | ||||
#include <vm/vm_radix.h> | #include <vm/vm_radix.h> | ||||
Show All 24 Lines | |||||
/* Returns one unit associated with specified level. */ | /* Returns one unit associated with specified level. */ | ||||
#define VM_RADIX_UNITLEVEL(lev) \ | #define VM_RADIX_UNITLEVEL(lev) \ | ||||
((vm_pindex_t)1 << ((lev) * VM_RADIX_WIDTH)) | ((vm_pindex_t)1 << ((lev) * VM_RADIX_WIDTH)) | ||||
enum vm_radix_access { SMR, LOCKED, UNSERIALIZED }; | enum vm_radix_access { SMR, LOCKED, UNSERIALIZED }; | ||||
struct vm_radix_node; | struct vm_radix_node; | ||||
SMR_TYPE_DECLARE(smrnode_t, struct vm_radix_node *); | typedef SMR_POINTER(struct vm_radix_node *) smrnode_t; | ||||
struct vm_radix_node { | struct vm_radix_node { | ||||
vm_pindex_t rn_owner; /* Owner of record. */ | vm_pindex_t rn_owner; /* Owner of record. */ | ||||
uint16_t rn_count; /* Valid children. */ | uint16_t rn_count; /* Valid children. */ | ||||
uint8_t rn_clev; /* Current level. */ | uint8_t rn_clev; /* Current level. */ | ||||
int8_t rn_last; /* zero last ptr. */ | int8_t rn_last; /* zero last ptr. */ | ||||
smrnode_t rn_child[VM_RADIX_COUNT]; /* Child nodes. */ | smrnode_t rn_child[VM_RADIX_COUNT]; /* Child nodes. */ | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 798 Lines • Show Last 20 Lines |