Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/uma_int.h
Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | |||||
#define UMA_ALIGN | #define UMA_ALIGN | ||||
#endif | #endif | ||||
/* | /* | ||||
* Structures for per cpu queues. | * Structures for per cpu queues. | ||||
*/ | */ | ||||
struct uma_bucket { | struct uma_bucket { | ||||
LIST_ENTRY(uma_bucket) ub_link; /* Link into the zone */ | TAILQ_ENTRY(uma_bucket) ub_link; /* Link into the zone */ | ||||
int16_t ub_cnt; /* Count of items in bucket. */ | int16_t ub_cnt; /* Count of items in bucket. */ | ||||
int16_t ub_entries; /* Max items. */ | int16_t ub_entries; /* Max items. */ | ||||
void *ub_bucket[]; /* actual allocation storage */ | void *ub_bucket[]; /* actual allocation storage */ | ||||
}; | }; | ||||
typedef struct uma_bucket * uma_bucket_t; | typedef struct uma_bucket * uma_bucket_t; | ||||
struct uma_cache { | struct uma_cache { | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
#define us_size us_type._us_size | #define us_size us_type._us_size | ||||
#if MAXMEMDOM >= 255 | #if MAXMEMDOM >= 255 | ||||
#error "Slab domain type insufficient" | #error "Slab domain type insufficient" | ||||
#endif | #endif | ||||
typedef struct uma_slab * uma_slab_t; | typedef struct uma_slab * uma_slab_t; | ||||
TAILQ_HEAD(uma_bucketlist, uma_bucket); | |||||
struct uma_zone_domain { | struct uma_zone_domain { | ||||
LIST_HEAD(,uma_bucket) uzd_buckets; /* full buckets */ | struct uma_bucketlist uzd_buckets; /* full buckets */ | ||||
long uzd_nitems; /* total item count */ | long uzd_nitems; /* total item count */ | ||||
long uzd_imax; /* maximum item count this period */ | long uzd_imax; /* maximum item count this period */ | ||||
long uzd_imin; /* minimum item count this period */ | long uzd_imin; /* minimum item count this period */ | ||||
long uzd_wss; /* working set size estimate */ | long uzd_wss; /* working set size estimate */ | ||||
}; | }; | ||||
typedef struct uma_zone_domain * uma_zone_domain_t; | typedef struct uma_zone_domain * uma_zone_domain_t; | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | struct uma_zone { | ||||
/* uz_domain follows here. */ | /* uz_domain follows here. */ | ||||
}; | }; | ||||
/* | /* | ||||
* These flags must not overlap with the UMA_ZONE flags specified in uma.h. | * These flags must not overlap with the UMA_ZONE flags specified in uma.h. | ||||
*/ | */ | ||||
#define UMA_ZFLAG_CACHE 0x04000000 /* uma_zcache_create()d it */ | #define UMA_ZFLAG_CACHE 0x04000000 /* uma_zcache_create()d it */ | ||||
#define UMA_ZFLAG_DRAINING 0x08000000 /* Running zone_drain. */ | #define UMA_ZFLAG_RECLAIMING 0x08000000 /* Running zone_reclaim(). */ | ||||
#define UMA_ZFLAG_BUCKET 0x10000000 /* Bucket zone. */ | #define UMA_ZFLAG_BUCKET 0x10000000 /* Bucket zone. */ | ||||
#define UMA_ZFLAG_INTERNAL 0x20000000 /* No offpage no PCPU. */ | #define UMA_ZFLAG_INTERNAL 0x20000000 /* No offpage no PCPU. */ | ||||
#define UMA_ZFLAG_CACHEONLY 0x80000000 /* Don't ask VM for buckets. */ | #define UMA_ZFLAG_CACHEONLY 0x80000000 /* Don't ask VM for buckets. */ | ||||
#define UMA_ZFLAG_INHERIT \ | #define UMA_ZFLAG_INHERIT \ | ||||
(UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY | UMA_ZFLAG_BUCKET) | (UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY | UMA_ZFLAG_BUCKET) | ||||
#undef UMA_ALIGN | #undef UMA_ALIGN | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |