FreeBSD virtual memory subsystem code
uma_int.h File Reference
#include <sys/counter.h>
#include <sys/_bitset.h>
#include <sys/_domainset.h>
#include <sys/_task.h>
Include dependency graph for uma_int.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  uma_hash
 
struct  uma_bucket
 
struct  uma_cache_bucket
 
struct  uma_cache
 
struct  uma_domain
 
struct  uma_keg
 
struct  uma_slab
 
struct  uma_hash_slab
 
struct  uma_zone_domain
 
struct  uma_zone
 

Macros

#define UMA_SLAB_SIZE   PAGE_SIZE /* How big are our slabs? */
 
#define UMA_SLAB_MASK   (PAGE_SIZE - 1) /* Mask to get back to the page */
 
#define UMA_SLAB_SHIFT   PAGE_SHIFT /* Number of bits PAGE_MASK */
 
#define UMA_MAX_WASTE   10
 
#define UMA_CACHESPREAD_MAX_SIZE   (128 * 1024)
 
#define UMA_ZFLAG_OFFPAGE
 
#define UMA_ZFLAG_HASH
 
#define UMA_ZFLAG_VTOSLAB
 
#define UMA_ZFLAG_CTORDTOR   0x01000000 /* Zone has ctor/dtor set. */
 
#define UMA_ZFLAG_LIMIT   0x02000000 /* Zone has limit set. */
 
#define UMA_ZFLAG_CACHE   0x04000000 /* uma_zcache_create()d it */
 
#define UMA_ZFLAG_BUCKET   0x10000000 /* Bucket zone. */
 
#define UMA_ZFLAG_INTERNAL   0x20000000 /* No offpage no PCPU. */
 
#define UMA_ZFLAG_TRASH   0x40000000 /* Add trash ctor/dtor. */
 
#define UMA_ZFLAG_INHERIT
 
#define PRINT_UMA_ZFLAGS
 
#define UMA_HASH_SIZE_INIT   32
 
#define UMA_HASH(h, s)   ((((uintptr_t)s) >> UMA_SLAB_SHIFT) & (h)->uh_hashmask)
 
#define UMA_HASH_INSERT(h, s, mem)
 
#define UMA_HASH_REMOVE(h, s)    LIST_REMOVE(slab_tohashslab(s), uhs_hlink)
 
#define UMA_SUPER_ALIGN   CACHE_LINE_SIZE
 
#define UMA_ALIGN   __aligned(UMA_SUPER_ALIGN)
 
#define SLAB_MAX_SETSIZE   (PAGE_SIZE / UMA_SMALLEST_UNIT)
 
#define SLAB_MIN_SETSIZE   _BITSET_BITS
 
#define UZ_ITEMS_SLEEPER_SHIFT   44LL
 
#define UZ_ITEMS_SLEEPERS_MAX   ((1 << (64 - UZ_ITEMS_SLEEPER_SHIFT)) - 1)
 
#define UZ_ITEMS_COUNT_MASK   ((1LL << UZ_ITEMS_SLEEPER_SHIFT) - 1)
 
#define UZ_ITEMS_COUNT(x)   ((x) & UZ_ITEMS_COUNT_MASK)
 
#define UZ_ITEMS_SLEEPERS(x)   ((x) >> UZ_ITEMS_SLEEPER_SHIFT)
 
#define UZ_ITEMS_SLEEPER   (1LL << UZ_ITEMS_SLEEPER_SHIFT)
 
#define ZONE_ASSERT_COLD(z)
 
#define ZDOM_GET(z, n)    (&((uma_zone_domain_t)&(z)->uz_cpu[mp_maxid + 1])[n])
 
#define KEG_LOCKPTR(k, d)   (struct mtx *)&(k)->uk_domain[(d)].ud_lock
 
#define KEG_LOCK_INIT(k, d, lc)
 
#define KEG_LOCK_FINI(k, d)   mtx_destroy(KEG_LOCKPTR(k, d))
 
#define KEG_LOCK(k, d)    ({ mtx_lock(KEG_LOCKPTR(k, d)); KEG_LOCKPTR(k, d); })
 
#define KEG_UNLOCK(k, d)   mtx_unlock(KEG_LOCKPTR(k, d))
 
#define KEG_LOCK_ASSERT(k, d)   mtx_assert(KEG_LOCKPTR(k, d), MA_OWNED)
 
#define KEG_GET(zone, keg)
 
#define KEG_ASSERT_COLD(k)
 
#define ZDOM_LOCK_INIT(z, zdom, lc)
 
#define ZDOM_LOCK_FINI(z)   mtx_destroy(&(z)->uzd_lock)
 
#define ZDOM_LOCK_ASSERT(z)   mtx_assert(&(z)->uzd_lock, MA_OWNED)
 
#define ZDOM_LOCK(z)   mtx_lock(&(z)->uzd_lock)
 
#define ZDOM_OWNED(z)   (mtx_owner(&(z)->uzd_lock) != NULL)
 
#define ZDOM_UNLOCK(z)   mtx_unlock(&(z)->uzd_lock)
 
#define ZONE_LOCK(z)   ZDOM_LOCK(ZDOM_GET((z), 0))
 
#define ZONE_UNLOCK(z)   ZDOM_UNLOCK(ZDOM_GET((z), 0))
 
#define ZONE_LOCKPTR(z)   (&ZDOM_GET((z), 0)->uzd_lock)
 
#define ZONE_CROSS_LOCK_INIT(z)    mtx_init(&(z)->uz_cross_lock, "UMA Cross", NULL, MTX_DEF)
 
#define ZONE_CROSS_LOCK(z)   mtx_lock(&(z)->uz_cross_lock)
 
#define ZONE_CROSS_UNLOCK(z)   mtx_unlock(&(z)->uz_cross_lock)
 
#define ZONE_CROSS_LOCK_FINI(z)   mtx_destroy(&(z)->uz_cross_lock)
 

Typedefs

typedef struct uma_bucketuma_bucket_t
 
typedef struct uma_cache_bucketuma_cache_bucket_t
 
typedef struct uma_cacheuma_cache_t
 
typedef struct uma_domainuma_domain_t
 
typedef struct uma_keguma_keg_t
 
typedef struct uma_slabuma_slab_t
 
typedef struct uma_hash_slabuma_hash_slab_t
 
typedef struct uma_zone_domainuma_zone_domain_t
 

Functions

 LIST_HEAD (slabhashhead, uma_hash_slab)
 
 LIST_HEAD (slabhead, uma_slab)
 
static void cache_set_uz_flags (uma_cache_t cache, uint32_t flags)
 
static void cache_set_uz_size (uma_cache_t cache, uint32_t size)
 
static uint32_t cache_uz_flags (uma_cache_t cache)
 
static uint32_t cache_uz_size (uma_cache_t cache)
 
struct uma_domain __aligned (CACHE_LINE_SIZE)
 
 BITSET_DEFINE (noslabbits, 0)
 
 _Static_assert (sizeof(struct uma_slab)==__offsetof(struct uma_slab, us_free), "us_free field must be last")
 
 _Static_assert (MAXMEMDOM< 255, "us_domain field is not wide enough")
 
static uma_hash_slab_t slab_tohashslab (uma_slab_t slab)
 
static void * slab_data (uma_slab_t slab, uma_keg_t keg)
 
static void * slab_item (uma_slab_t slab, uma_keg_t keg, int index)
 
static int slab_item_index (uma_slab_t slab, uma_keg_t keg, void *item)
 
 STAILQ_HEAD (uma_bucketlist, uma_bucket)
 
static __inline uma_slab_t hash_sfind (struct uma_hash *hash, uint8_t *data)
 
static __inline uma_slab_t vtoslab (vm_offset_t va)
 
static __inline void vtozoneslab (vm_offset_t va, uma_zone_t *zone, uma_slab_t *slab)
 
static __inline void vsetzoneslab (vm_offset_t va, uma_zone_t zone, uma_slab_t slab)
 
static void uma_total_dec (unsigned long size)
 
static void uma_total_inc (unsigned long size)
 
void * uma_small_alloc (uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag, int wait)
 
void uma_small_free (void *mem, vm_size_t size, uint8_t flags)
 
void uma_set_limit (unsigned long limit)
 

Variables

struct uma_cache UMA_ALIGN
 
struct mtx_padalign ud_lock
 
struct slabhead ud_part_slab
 
struct slabhead ud_free_slab
 
struct slabhead ud_full_slab
 
uint32_t ud_pages
 
uint32_t ud_free_items
 
uint32_t ud_free_slabs
 
struct uma_keg __aligned
 
struct uma_bucketlist uzd_buckets
 
uma_bucket_t uzd_cross
 
long uzd_nitems
 
long uzd_imax
 
long uzd_imin
 
long uzd_bimin
 
long uzd_wss
 
long uzd_limin
 
u_int uzd_timin
 
smr_seq_t uzd_seq
 
struct mtx uzd_lock
 
unsigned long uma_kmem_limit
 
unsigned long uma_kmem_total
 

Macro Definition Documentation

◆ KEG_ASSERT_COLD

#define KEG_ASSERT_COLD (   k)
Value:
KASSERT(uma_keg_get_allocs((k)) == 0, \
("keg %s initialization after use.", (k)->uk_name))

Definition at line 553 of file uma_int.h.

◆ KEG_GET

#define KEG_GET (   zone,
  keg 
)
Value:
do { \
(keg) = (zone)->uz_keg; \
KASSERT((void *)(keg) != NULL, \
("%s: Invalid zone %p type", __func__, (zone))); \
} while (0)

Definition at line 547 of file uma_int.h.

◆ KEG_LOCK

#define KEG_LOCK (   k,
 
)     ({ mtx_lock(KEG_LOCKPTR(k, d)); KEG_LOCKPTR(k, d); })

Definition at line 542 of file uma_int.h.

◆ KEG_LOCK_ASSERT

#define KEG_LOCK_ASSERT (   k,
 
)    mtx_assert(KEG_LOCKPTR(k, d), MA_OWNED)

Definition at line 545 of file uma_int.h.

◆ KEG_LOCK_FINI

#define KEG_LOCK_FINI (   k,
 
)    mtx_destroy(KEG_LOCKPTR(k, d))

Definition at line 541 of file uma_int.h.

◆ KEG_LOCK_INIT

#define KEG_LOCK_INIT (   k,
  d,
  lc 
)
Value:
do { \
if ((lc)) \
mtx_init(KEG_LOCKPTR(k, d), (k)->uk_name, \
(k)->uk_name, MTX_DEF | MTX_DUPOK); \
else \
mtx_init(KEG_LOCKPTR(k, d), (k)->uk_name, \
"UMA zone", MTX_DEF | MTX_DUPOK); \
} while (0)
#define KEG_LOCKPTR(k, d)
Definition: uma_int.h:530

Definition at line 531 of file uma_int.h.

◆ KEG_LOCKPTR

#define KEG_LOCKPTR (   k,
 
)    (struct mtx *)&(k)->uk_domain[(d)].ud_lock

Definition at line 530 of file uma_int.h.

◆ KEG_UNLOCK

#define KEG_UNLOCK (   k,
 
)    mtx_unlock(KEG_LOCKPTR(k, d))

Definition at line 544 of file uma_int.h.

◆ PRINT_UMA_ZFLAGS

#define PRINT_UMA_ZFLAGS
Value:
"\20" \
"\37TRASH" \
"\36INTERNAL" \
"\35BUCKET" \
"\33CACHE" \
"\32LIMIT" \
"\31CTORDTOR" \
"\30VTOSLAB" \
"\27HASH" \
"\26OFFPAGE" \
"\23SMR" \
"\22ROUNDROBIN" \
"\21FIRSTTOUCH" \
"\20PCPU" \
"\17NODUMP" \
"\16CACHESPREAD" \
"\14MAXBUCKET" \
"\13NOBUCKET" \
"\12SECONDARY" \
"\11NOTPAGE" \
"\10VM" \
"\7MTXCLASS" \
"\6NOFREE" \
"\5MALLOC" \
"\4NOTOUCH" \
"\3CONTIG" \
"\2ZINIT"

Definition at line 162 of file uma_int.h.

◆ SLAB_MAX_SETSIZE

#define SLAB_MAX_SETSIZE   (PAGE_SIZE / UMA_SMALLEST_UNIT)

Definition at line 360 of file uma_int.h.

◆ SLAB_MIN_SETSIZE

#define SLAB_MIN_SETSIZE   _BITSET_BITS

Definition at line 361 of file uma_int.h.

◆ UMA_ALIGN

#define UMA_ALIGN   __aligned(UMA_SUPER_ALIGN)

Definition at line 225 of file uma_int.h.

◆ UMA_CACHESPREAD_MAX_SIZE

#define UMA_CACHESPREAD_MAX_SIZE   (128 * 1024)

Definition at line 143 of file uma_int.h.

◆ UMA_HASH

#define UMA_HASH (   h,
 
)    ((((uintptr_t)s) >> UMA_SLAB_SHIFT) & (h)->uh_hashmask)

Definition at line 198 of file uma_int.h.

◆ UMA_HASH_INSERT

#define UMA_HASH_INSERT (   h,
  s,
  mem 
)
Value:
LIST_INSERT_HEAD(&(h)->uh_slab_hash[UMA_HASH((h), \
(mem))], slab_tohashslab(s), uhs_hlink)
#define UMA_HASH(h, s)
Definition: uma_int.h:198
static uma_hash_slab_t slab_tohashslab(uma_slab_t slab)
Definition: uma_int.h:395

Definition at line 200 of file uma_int.h.

◆ UMA_HASH_REMOVE

#define UMA_HASH_REMOVE (   h,
 
)     LIST_REMOVE(slab_tohashslab(s), uhs_hlink)

Definition at line 204 of file uma_int.h.

◆ UMA_HASH_SIZE_INIT

#define UMA_HASH_SIZE_INIT   32

Definition at line 196 of file uma_int.h.

◆ UMA_MAX_WASTE

#define UMA_MAX_WASTE   10

Definition at line 140 of file uma_int.h.

◆ UMA_SLAB_MASK

#define UMA_SLAB_MASK   (PAGE_SIZE - 1) /* Mask to get back to the page */

Definition at line 136 of file uma_int.h.

◆ UMA_SLAB_SHIFT

#define UMA_SLAB_SHIFT   PAGE_SHIFT /* Number of bits PAGE_MASK */

Definition at line 137 of file uma_int.h.

◆ UMA_SLAB_SIZE

#define UMA_SLAB_SIZE   PAGE_SIZE /* How big are our slabs? */

Definition at line 135 of file uma_int.h.

◆ UMA_SUPER_ALIGN

#define UMA_SUPER_ALIGN   CACHE_LINE_SIZE

Definition at line 222 of file uma_int.h.

◆ UMA_ZFLAG_BUCKET

#define UMA_ZFLAG_BUCKET   0x10000000 /* Bucket zone. */

Definition at line 154 of file uma_int.h.

◆ UMA_ZFLAG_CACHE

#define UMA_ZFLAG_CACHE   0x04000000 /* uma_zcache_create()d it */

Definition at line 153 of file uma_int.h.

◆ UMA_ZFLAG_CTORDTOR

#define UMA_ZFLAG_CTORDTOR   0x01000000 /* Zone has ctor/dtor set. */

Definition at line 151 of file uma_int.h.

◆ UMA_ZFLAG_HASH

#define UMA_ZFLAG_HASH
Value:
0x00400000 /*
* Use a hash table instead of
* caching information in the
* vm_page.
*/

Definition at line 149 of file uma_int.h.

◆ UMA_ZFLAG_INHERIT

#define UMA_ZFLAG_INHERIT
Value:
UMA_ZFLAG_BUCKET | UMA_ZFLAG_INTERNAL)
#define UMA_ZFLAG_OFFPAGE
Definition: uma_int.h:148
#define UMA_ZFLAG_INTERNAL
Definition: uma_int.h:155
#define UMA_ZFLAG_HASH
Definition: uma_int.h:149
#define UMA_ZFLAG_VTOSLAB
Definition: uma_int.h:150

Definition at line 158 of file uma_int.h.

◆ UMA_ZFLAG_INTERNAL

#define UMA_ZFLAG_INTERNAL   0x20000000 /* No offpage no PCPU. */

Definition at line 155 of file uma_int.h.

◆ UMA_ZFLAG_LIMIT

#define UMA_ZFLAG_LIMIT   0x02000000 /* Zone has limit set. */

Definition at line 152 of file uma_int.h.

◆ UMA_ZFLAG_OFFPAGE

#define UMA_ZFLAG_OFFPAGE
Value:
0x00200000 /*
* Force the slab structure
* allocation off of the real
* memory.
*/

Definition at line 148 of file uma_int.h.

◆ UMA_ZFLAG_TRASH

#define UMA_ZFLAG_TRASH   0x40000000 /* Add trash ctor/dtor. */

Definition at line 156 of file uma_int.h.

◆ UMA_ZFLAG_VTOSLAB

#define UMA_ZFLAG_VTOSLAB
Value:
0x00800000 /*
* Zone uses vtoslab for
* lookup.
*/

Definition at line 150 of file uma_int.h.

◆ UZ_ITEMS_COUNT

#define UZ_ITEMS_COUNT (   x)    ((x) & UZ_ITEMS_COUNT_MASK)

Definition at line 510 of file uma_int.h.

◆ UZ_ITEMS_COUNT_MASK

#define UZ_ITEMS_COUNT_MASK   ((1LL << UZ_ITEMS_SLEEPER_SHIFT) - 1)

Definition at line 509 of file uma_int.h.

◆ UZ_ITEMS_SLEEPER

#define UZ_ITEMS_SLEEPER   (1LL << UZ_ITEMS_SLEEPER_SHIFT)

Definition at line 512 of file uma_int.h.

◆ UZ_ITEMS_SLEEPER_SHIFT

#define UZ_ITEMS_SLEEPER_SHIFT   44LL

Definition at line 507 of file uma_int.h.

◆ UZ_ITEMS_SLEEPERS

#define UZ_ITEMS_SLEEPERS (   x)    ((x) >> UZ_ITEMS_SLEEPER_SHIFT)

Definition at line 511 of file uma_int.h.

◆ UZ_ITEMS_SLEEPERS_MAX

#define UZ_ITEMS_SLEEPERS_MAX   ((1 << (64 - UZ_ITEMS_SLEEPER_SHIFT)) - 1)

Definition at line 508 of file uma_int.h.

◆ ZDOM_GET

#define ZDOM_GET (   z,
 
)     (&((uma_zone_domain_t)&(z)->uz_cpu[mp_maxid + 1])[n])

Definition at line 519 of file uma_int.h.

◆ ZDOM_LOCK

#define ZDOM_LOCK (   z)    mtx_lock(&(z)->uzd_lock)

Definition at line 569 of file uma_int.h.

◆ ZDOM_LOCK_ASSERT

#define ZDOM_LOCK_ASSERT (   z)    mtx_assert(&(z)->uzd_lock, MA_OWNED)

Definition at line 567 of file uma_int.h.

◆ ZDOM_LOCK_FINI

#define ZDOM_LOCK_FINI (   z)    mtx_destroy(&(z)->uzd_lock)

Definition at line 566 of file uma_int.h.

◆ ZDOM_LOCK_INIT

#define ZDOM_LOCK_INIT (   z,
  zdom,
  lc 
)
Value:
do { \
if ((lc)) \
mtx_init(&(zdom)->uzd_lock, (z)->uz_name, \
(z)->uz_name, MTX_DEF | MTX_DUPOK); \
else \
mtx_init(&(zdom)->uzd_lock, (z)->uz_name, \
"UMA zone", MTX_DEF | MTX_DUPOK); \
} while (0)
struct mtx uzd_lock
Definition: uma_int.h:10

Definition at line 557 of file uma_int.h.

◆ ZDOM_OWNED

#define ZDOM_OWNED (   z)    (mtx_owner(&(z)->uzd_lock) != NULL)

Definition at line 570 of file uma_int.h.

◆ ZDOM_UNLOCK

#define ZDOM_UNLOCK (   z)    mtx_unlock(&(z)->uzd_lock)

Definition at line 571 of file uma_int.h.

◆ ZONE_ASSERT_COLD

#define ZONE_ASSERT_COLD (   z)
Value:
KASSERT(uma_zone_get_allocs((z)) == 0, \
("zone %s initialization after use.", (z)->uz_name))
static uint64_t uma_zone_get_allocs(uma_zone_t zone)
Definition: uma_core.c:4950

Definition at line 514 of file uma_int.h.

◆ ZONE_CROSS_LOCK

#define ZONE_CROSS_LOCK (   z)    mtx_lock(&(z)->uz_cross_lock)

Definition at line 579 of file uma_int.h.

◆ ZONE_CROSS_LOCK_FINI

#define ZONE_CROSS_LOCK_FINI (   z)    mtx_destroy(&(z)->uz_cross_lock)

Definition at line 581 of file uma_int.h.

◆ ZONE_CROSS_LOCK_INIT

#define ZONE_CROSS_LOCK_INIT (   z)     mtx_init(&(z)->uz_cross_lock, "UMA Cross", NULL, MTX_DEF)

Definition at line 577 of file uma_int.h.

◆ ZONE_CROSS_UNLOCK

#define ZONE_CROSS_UNLOCK (   z)    mtx_unlock(&(z)->uz_cross_lock)

Definition at line 580 of file uma_int.h.

◆ ZONE_LOCK

#define ZONE_LOCK (   z)    ZDOM_LOCK(ZDOM_GET((z), 0))

Definition at line 573 of file uma_int.h.

◆ ZONE_LOCKPTR

#define ZONE_LOCKPTR (   z)    (&ZDOM_GET((z), 0)->uzd_lock)

Definition at line 575 of file uma_int.h.

◆ ZONE_UNLOCK

#define ZONE_UNLOCK (   z)    ZDOM_UNLOCK(ZDOM_GET((z), 0))

Definition at line 574 of file uma_int.h.

Typedef Documentation

◆ uma_bucket_t

typedef struct uma_bucket* uma_bucket_t

Definition at line 240 of file uma_int.h.

◆ uma_cache_bucket_t

Definition at line 253 of file uma_int.h.

◆ uma_cache_t

typedef struct uma_cache* uma_cache_t

Definition at line 267 of file uma_int.h.

◆ uma_domain_t

typedef struct uma_domain* uma_domain_t

Definition at line 317 of file uma_int.h.

◆ uma_hash_slab_t

typedef struct uma_hash_slab* uma_hash_slab_t

Definition at line 392 of file uma_int.h.

◆ uma_keg_t

typedef struct uma_keg* uma_keg_t

Definition at line 355 of file uma_int.h.

◆ uma_slab_t

typedef struct uma_slab* uma_slab_t

Definition at line 380 of file uma_int.h.

◆ uma_zone_domain_t

Definition at line 445 of file uma_int.h.

Function Documentation

◆ __aligned()

struct uma_domain __aligned ( CACHE_LINE_SIZE  )

◆ _Static_assert() [1/2]

_Static_assert ( )

◆ _Static_assert() [2/2]

_Static_assert ( sizeof(struct uma_slab = =__offsetof(struct uma_slab, us_free),
"us_free field must be last"   
)

◆ BITSET_DEFINE()

BITSET_DEFINE ( noslabbits  ,
 
)

◆ cache_set_uz_flags()

static void cache_set_uz_flags ( uma_cache_t  cache,
uint32_t  flags 
)
inlinestatic

Definition at line 277 of file uma_int.h.

Referenced by zone_update_caches().

Here is the caller graph for this function:

◆ cache_set_uz_size()

static void cache_set_uz_size ( uma_cache_t  cache,
uint32_t  size 
)
inlinestatic

Definition at line 284 of file uma_int.h.

Referenced by zone_update_caches().

Here is the caller graph for this function:

◆ cache_uz_flags()

static uint32_t cache_uz_flags ( uma_cache_t  cache)
inlinestatic

Definition at line 291 of file uma_int.h.

Referenced by cache_alloc(), cache_alloc_item(), cache_fetch_bucket(), cache_free(), uma_zfree_arg(), and uma_zfree_smr().

Here is the caller graph for this function:

◆ cache_uz_size()

static uint32_t cache_uz_size ( uma_cache_t  cache)
inlinestatic

Definition at line 298 of file uma_int.h.

Referenced by cache_alloc_item(), and uma_zfree_arg().

Here is the caller graph for this function:

◆ hash_sfind()

static __inline uma_slab_t hash_sfind ( struct uma_hash hash,
uint8_t *  data 
)
static

Definition at line 595 of file uma_int.h.

Referenced by zone_release().

Here is the caller graph for this function:

◆ LIST_HEAD() [1/2]

LIST_HEAD ( slabhashhead  ,
uma_hash_slab   
)

◆ LIST_HEAD() [2/2]

◆ slab_data()

static void * slab_data ( uma_slab_t  slab,
uma_keg_t  keg 
)
inlinestatic

Definition at line 402 of file uma_int.h.

References uma_hash_slab::uhs_slab.

Referenced by keg_free_slab(), and slab_item_index().

Here is the caller graph for this function:

◆ slab_item()

static void * slab_item ( uma_slab_t  slab,
uma_keg_t  keg,
int  index 
)
inlinestatic

Definition at line 412 of file uma_int.h.

References slab_tohashslab(), uma_hash_slab::uhs_data, uma_keg::uk_flags, uma_keg::uk_pgoff, and UMA_ZFLAG_OFFPAGE.

Referenced by keg_alloc_slab(), keg_free_slab(), and slab_alloc_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ slab_item_index()

static int slab_item_index ( uma_slab_t  slab,
uma_keg_t  keg,
void *  item 
)
inlinestatic

Definition at line 421 of file uma_int.h.

References slab_data(), and uma_keg::uk_rsize.

Referenced by slab_free_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ slab_tohashslab()

static uma_hash_slab_t slab_tohashslab ( uma_slab_t  slab)
inlinestatic

Definition at line 395 of file uma_int.h.

References uma_hash_slab::LIST_ENTRY(), uma_hash_slab::uhs_data, and uma_hash_slab::uhs_slab.

Referenced by keg_alloc_slab(), keg_free_slab(), and slab_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STAILQ_HEAD()

STAILQ_HEAD ( uma_bucketlist  ,
uma_bucket   
)

◆ uma_set_limit()

void uma_set_limit ( unsigned long  limit)

Definition at line 5318 of file uma_core.c.

References uma_kmem_limit.

◆ uma_small_alloc()

void * uma_small_alloc ( uma_zone_t  zone,
vm_size_t  bytes,
int  domain,
uint8_t *  pflag,
int  wait 
)

Referenced by keg_ctor(), and uma_zone_reserve_kva().

Here is the caller graph for this function:

◆ uma_small_free()

void uma_small_free ( void *  mem,
vm_size_t  size,
uint8_t  flags 
)

Referenced by keg_ctor().

Here is the caller graph for this function:

◆ uma_total_dec()

static void uma_total_dec ( unsigned long  size)
inlinestatic

Definition at line 643 of file uma_int.h.

Referenced by keg_free_slab().

Here is the caller graph for this function:

◆ uma_total_inc()

static void uma_total_inc ( unsigned long  size)
inlinestatic

Definition at line 650 of file uma_int.h.

References uma_kmem_total.

Referenced by keg_alloc_slab().

Here is the caller graph for this function:

◆ vsetzoneslab()

static __inline void vsetzoneslab ( vm_offset_t  va,
uma_zone_t  zone,
uma_slab_t  slab 
)
static

Definition at line 629 of file uma_int.h.

References PHYS_TO_VM_PAGE().

Referenced by keg_alloc_slab().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vtoslab()

static __inline uma_slab_t vtoslab ( vm_offset_t  va)
static

Definition at line 610 of file uma_int.h.

Referenced by zone_release().

Here is the caller graph for this function:

◆ vtozoneslab()

static __inline void vtozoneslab ( vm_offset_t  va,
uma_zone_t zone,
uma_slab_t slab 
)
static

Definition at line 619 of file uma_int.h.

References PHYS_TO_VM_PAGE().

Here is the call graph for this function:

Variable Documentation

◆ __aligned

u_int __aligned

◆ ud_free_items

uint32_t ud_free_items

Definition at line 5 of file uma_int.h.

◆ ud_free_slab

struct slabhead ud_free_slab

Definition at line 2 of file uma_int.h.

◆ ud_free_slabs

uint32_t ud_free_slabs

Definition at line 6 of file uma_int.h.

◆ ud_full_slab

struct slabhead ud_full_slab

Definition at line 3 of file uma_int.h.

◆ ud_lock

struct mtx_padalign ud_lock

Definition at line 0 of file uma_int.h.

◆ ud_pages

uint32_t ud_pages

Definition at line 4 of file uma_int.h.

◆ ud_part_slab

struct slabhead ud_part_slab

Definition at line 1 of file uma_int.h.

◆ UMA_ALIGN

struct uma_cache UMA_ALIGN

◆ uma_kmem_limit

unsigned long uma_kmem_limit
extern

Referenced by uma_avail(), uma_limit(), and uma_set_limit().

◆ uma_kmem_total

unsigned long uma_kmem_total
extern

Referenced by uma_size(), and uma_total_inc().

◆ uzd_bimin

long uzd_bimin

Definition at line 5 of file uma_int.h.

◆ uzd_buckets

struct uma_bucketlist uzd_buckets

Definition at line 0 of file uma_int.h.

◆ uzd_cross

uma_bucket_t uzd_cross

Definition at line 1 of file uma_int.h.

◆ uzd_imax

long uzd_imax

Definition at line 3 of file uma_int.h.

Referenced by cache_alloc().

◆ uzd_imin

long uzd_imin

Definition at line 4 of file uma_int.h.

◆ uzd_limin

long uzd_limin

Definition at line 7 of file uma_int.h.

◆ uzd_lock

struct mtx uzd_lock

Definition at line 10 of file uma_int.h.

◆ uzd_nitems

long uzd_nitems

Definition at line 2 of file uma_int.h.

Referenced by zone_domain_highest().

◆ uzd_seq

smr_seq_t uzd_seq

Definition at line 9 of file uma_int.h.

◆ uzd_timin

u_int uzd_timin

Definition at line 8 of file uma_int.h.

◆ uzd_wss

long uzd_wss

Definition at line 6 of file uma_int.h.