Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/uma.h
Show First 20 Lines • Show All 253 Lines • ▼ Show 20 Lines | #define UMA_ZONE_CACHESPREAD 0x2000 /* | ||||
* require many virtually contiguous | * require many virtually contiguous | ||||
* backend pages and can fail early. | * backend pages and can fail early. | ||||
*/ | */ | ||||
#define UMA_ZONE_NODUMP 0x4000 /* | #define UMA_ZONE_NODUMP 0x4000 /* | ||||
* Zone's pages will not be included in | * Zone's pages will not be included in | ||||
* mini-dumps. | * mini-dumps. | ||||
*/ | */ | ||||
#define UMA_ZONE_PCPU 0x8000 /* | #define UMA_ZONE_PCPU 0x8000 /* | ||||
* Allocates mp_maxid + 1 slabs of PAGE_SIZE | * Allocates mp_maxid + 1 slabs of | ||||
* PAGE_SIZE | |||||
*/ | */ | ||||
#define UMA_ZONE_FIRSTTOUCH 0x10000 /* First touch NUMA policy */ | #define UMA_ZONE_FIRSTTOUCH 0x10000 /* First touch NUMA policy */ | ||||
#define UMA_ZONE_ROUNDROBIN 0x20000 /* Round-robin NUMA policy. */ | #define UMA_ZONE_ROUNDROBIN 0x20000 /* Round-robin NUMA policy. */ | ||||
#define UMA_ZONE_SMR 0x40000 /* | |||||
* Safe memory reclamation defers | |||||
* frees until all read sections | |||||
* have exited. This flag creates | |||||
jeff: This comment is stale. The memory will not be re-used at all until the smr epoch expires. | |||||
* a unique SMR context for this | |||||
* zone. To share contexts see | |||||
* uma_zone_set_smr() below. | |||||
* | |||||
* See sys/smr.h for more details. | |||||
*/ | |||||
/* In use by UMA_ZFLAGs: 0xffe00000 */ | /* In use by UMA_ZFLAGs: 0xffe00000 */ | ||||
/* | /* | ||||
* These flags are shared between the keg and zone. In zones wishing to add | * These flags are shared between the keg and zone. Some are determined | ||||
* new kegs these flags must be compatible. Some are determined based on | * based on physical parameters of the request and may not be provided by | ||||
* physical parameters of the request and may not be provided by the consumer. | * the consumer. | ||||
*/ | */ | ||||
#define UMA_ZONE_INHERIT \ | #define UMA_ZONE_INHERIT \ | ||||
(UMA_ZONE_NOTOUCH | UMA_ZONE_MALLOC | UMA_ZONE_NOFREE | \ | (UMA_ZONE_NOTOUCH | UMA_ZONE_MALLOC | UMA_ZONE_NOFREE | \ | ||||
UMA_ZONE_NOTPAGE | UMA_ZONE_PCPU | UMA_ZONE_FIRSTTOUCH | \ | UMA_ZONE_NOTPAGE | UMA_ZONE_PCPU | UMA_ZONE_FIRSTTOUCH | \ | ||||
UMA_ZONE_ROUNDROBIN) | UMA_ZONE_ROUNDROBIN) | ||||
/* Definitions for align */ | /* Definitions for align */ | ||||
#define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */ | #define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */ | ||||
▲ Show 20 Lines • Show All 314 Lines • ▼ Show 20 Lines | |||||
* zone The zone that intends to use this free routine. | * zone The zone that intends to use this free routine. | ||||
* freef The page freeing routine. | * freef The page freeing routine. | ||||
* | * | ||||
* Returns: | * Returns: | ||||
* Nothing | * Nothing | ||||
*/ | */ | ||||
void uma_zone_set_freef(uma_zone_t zone, uma_free freef); | void uma_zone_set_freef(uma_zone_t zone, uma_free freef); | ||||
/* | |||||
* Associate a zone with a smr context that is allocated after creation | |||||
* so that multiple zones may share the same context. | |||||
*/ | |||||
struct smr; | |||||
void uma_zone_set_smr(uma_zone_t zone, struct smr *); | |||||
/* | |||||
* Fetch the smr context that was set or made in uma_zcreate(). | |||||
*/ | |||||
struct smr *uma_zone_get_smr(uma_zone_t zone); | |||||
/* | /* | ||||
* These flags are setable in the allocf and visible in the freef. | * These flags are setable in the allocf and visible in the freef. | ||||
*/ | */ | ||||
#define UMA_SLAB_BOOT 0x01 /* Slab alloced from boot pages */ | #define UMA_SLAB_BOOT 0x01 /* Slab alloced from boot pages */ | ||||
#define UMA_SLAB_KERNEL 0x04 /* Slab alloced from kmem */ | #define UMA_SLAB_KERNEL 0x04 /* Slab alloced from kmem */ | ||||
#define UMA_SLAB_PRIV 0x08 /* Slab alloced from priv allocator */ | #define UMA_SLAB_PRIV 0x08 /* Slab alloced from priv allocator */ | ||||
#define UMA_SLAB_OFFP 0x10 /* Slab is managed separately */ | #define UMA_SLAB_OFFP 0x10 /* Slab is managed separately */ | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |
This comment is stale. The memory will not be re-used at all until the smr epoch expires.