MCPcopy Create free account
hub / github.com/F-Stack/f-stack / uma_zalloc_smr

Function uma_zalloc_smr

freebsd/vm/uma_core.c:3408–3429  ·  view source on GitHub ↗

See uma.h */

Source from the content-addressed store, hash-verified

3406
3407/* See uma.h */
3408void *
3409uma_zalloc_smr(uma_zone_t zone, int flags)
3410{
3411 uma_cache_bucket_t bucket;
3412 uma_cache_t cache;
3413
3414#ifdef UMA_ZALLOC_DEBUG
3415 void *item;
3416
3417 KASSERT((zone->uz_flags & UMA_ZONE_SMR) != 0,
3418 ("uma_zalloc_arg: called with non-SMR zone."));
3419 if (uma_zalloc_debug(zone, &item, NULL, flags) == EJUSTRETURN)
3420 return (item);
3421#endif
3422
3423 critical_enter();
3424 cache = &zone->uz_cpu[curcpu];
3425 bucket = &cache->uc_allocbucket;
3426 if (__predict_false(bucket->ucb_cnt == 0))
3427 return (cache_alloc_retry(zone, cache, NULL, flags));
3428 return (cache_alloc_item(zone, cache, bucket, NULL, flags));
3429}
3430
3431/* See uma.h */
3432void *

Callers 9

zfs_znode_alloc_kmemFunction · 0.85
pwd_allocFunction · 0.85
buf_trie_allocFunction · 0.85
vn_alloc_hardFunction · 0.85
vn_allocFunction · 0.85
cache_symlink_allocFunction · 0.85
cache_alloc_umaFunction · 0.85
vm_radix_node_getFunction · 0.85
uma_zwaitFunction · 0.85

Calls 4

uma_zalloc_debugFunction · 0.85
cache_alloc_retryFunction · 0.85
cache_alloc_itemFunction · 0.85
critical_enterFunction · 0.50

Tested by

no test coverage detected