Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/uma.h
Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | |||||
* Returns: | * Returns: | ||||
* A pointer to a structure which is intended to be opaque to users of | * A pointer to a structure which is intended to be opaque to users of | ||||
* the interface. The value may be null if the wait flag is not set. | * the interface. The value may be null if the wait flag is not set. | ||||
*/ | */ | ||||
uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor, | uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor, | ||||
uma_init zinit, uma_fini zfini, uma_zone_t master); | uma_init zinit, uma_fini zfini, uma_zone_t master); | ||||
/* | /* | ||||
* Add a second master to a secondary zone. This provides multiple data | |||||
* backends for objects with the same size. Both masters must have | |||||
* compatible allocation flags. Presently, UMA_ZONE_MALLOC type zones are | |||||
* the only supported. | |||||
* | |||||
* Returns: | |||||
* Error on failure, 0 on success. | |||||
*/ | |||||
int uma_zsecond_add(uma_zone_t zone, uma_zone_t master); | |||||
/* | |||||
* Create cache-only zones. | * Create cache-only zones. | ||||
* | * | ||||
* This allows uma's per-cpu cache facilities to handle arbitrary | * This allows uma's per-cpu cache facilities to handle arbitrary | ||||
* pointers. Consumers must specify the import and release functions to | * pointers. Consumers must specify the import and release functions to | ||||
* fill and destroy caches. UMA does not allocate any memory for these | * fill and destroy caches. UMA does not allocate any memory for these | ||||
* zones. The 'arg' parameter is passed to import/release and is caller | * zones. The 'arg' parameter is passed to import/release and is caller | ||||
* specific. | * specific. | ||||
*/ | */ | ||||
Show All 40 Lines | #define UMA_ZONE_NODUMP 0x4000 /* | ||||
*/ | */ | ||||
#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_NUMA 0x10000 /* | #define UMA_ZONE_NUMA 0x10000 /* | ||||
* NUMA aware Zone. Implements a best | * NUMA aware Zone. Implements a best | ||||
* effort first-touch policy. | * effort first-touch policy. | ||||
*/ | */ | ||||
#define UMA_ZONE_NOBUCKETCACHE 0x20000 /* | |||||
* Don't cache full buckets. Limit | |||||
* UMA to per-cpu state. | |||||
*/ | |||||
/* | /* | ||||
* These flags are shared between the keg and zone. In zones wishing to add | * These flags are shared between the keg and zone. In zones wishing to add | ||||
* new kegs these flags must be compatible. Some are determined based on | * new kegs these flags must be compatible. Some are determined based on | ||||
* physical parameters of the request and may not be provided by the consumer. | * physical parameters of the request and may not be provided by the consumer. | ||||
*/ | */ | ||||
#define UMA_ZONE_INHERIT \ | #define UMA_ZONE_INHERIT \ | ||||
(UMA_ZONE_OFFPAGE | UMA_ZONE_MALLOC | UMA_ZONE_NOFREE | \ | (UMA_ZONE_OFFPAGE | UMA_ZONE_MALLOC | UMA_ZONE_NOFREE | \ | ||||
▲ Show 20 Lines • Show All 205 Lines • ▼ Show 20 Lines | |||||
* Arguments: | * Arguments: | ||||
* zone The zone to limit | * zone The zone to limit | ||||
* nitems The requested upper limit on the number of items allowed | * nitems The requested upper limit on the number of items allowed | ||||
* | * | ||||
* Returns: | * Returns: | ||||
* int The effective value of nitems after rounding up based on page size | * int The effective value of nitems after rounding up based on page size | ||||
*/ | */ | ||||
int uma_zone_set_max(uma_zone_t zone, int nitems); | int uma_zone_set_max(uma_zone_t zone, int nitems); | ||||
/* | |||||
* Sets a high limit on the number of items allowed in zone's bucket cache | |||||
markj: "an upper limit" would sound more natural to me, and you use that term below. | |||||
Done Inline ActionsBut existing uma_zone_set_max() comment already has this wording. glebius: But existing uma_zone_set_max() comment already has this wording. | |||||
* | |||||
* Arguments: | |||||
* zone The zone to limit | |||||
* nitems The requested upper limit on the number of items allowed | |||||
* | |||||
* Returns: | |||||
* int The effective value of nitems set | |||||
*/ | |||||
int uma_zone_set_maxcache(uma_zone_t zone, int nitems); | |||||
/* | /* | ||||
* Obtains the effective limit on the number of items in a zone | * Obtains the effective limit on the number of items in a zone | ||||
* | * | ||||
* Arguments: | * Arguments: | ||||
* zone The zone to obtain the effective limit from | * zone The zone to obtain the effective limit from | ||||
* | * | ||||
* Return: | * Return: | ||||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |
"an upper limit" would sound more natural to me, and you use that term below.