allocator
static struct allocator generic_allocator_table[] = {
static struct allocator kernel_allocator_table[] = {
static struct allocator calloc_table[] = {
char *allocator;
allocator = get_allocator_info(expr, state);
if (allocator)
sql_insert_mtag_info(tag, ALLOCATOR, allocator);
char **allocator = _allocator;
if (*allocator) {
if (strcmp(*allocator, argv[0]) == 0)
free_string(*allocator);
*allocator = alloc_string("unknown");
*allocator = alloc_string(argv[0]);
char *allocator = NULL;
run_sql(save_allocator, &allocator,
return allocator;
hashalloc(struct inode *ip, int cg, long pref, int size, ulong_t (*allocator)())
result = (*allocator)(ip, cg, pref, size);
result = (*allocator)(ip, cg, 0, size);
result = (*allocator)(ip, cg, 0, size);
uint64_t psize, int allocator, int d)
uint64_t qmax = mg->mg_cur_max_alloc_queue_depth[allocator];
&mg->mg_alloc_queue_depth[allocator]);
qmax = mgp->mg_cur_max_alloc_queue_depth[allocator];
&mgp->mg_alloc_queue_depth[allocator]);
int allocator, uint64_t activation_weight)
if (arr[allocator] != NULL) {
arr[allocator] = msp;
msp->ms_allocator = allocator;
metaslab_activate(metaslab_t *msp, int allocator, uint64_t activation_weight)
if (msp->ms_allocator != allocator)
allocator, activation_weight)) != 0) {
int allocator)
mat->mat_allocator = allocator;
int allocator)
(void) zfs_refcount_add(&mg->mg_alloc_queue_depth[allocator], tag);
metaslab_group_increment_qdepth(metaslab_group_t *mg, int allocator)
uint64_t cur = mg->mg_cur_max_alloc_queue_depth[allocator];
if (atomic_cas_64(&mg->mg_cur_max_alloc_queue_depth[allocator],
&mg->mg_class->mc_alloc_max_slots[allocator]);
cur = mg->mg_cur_max_alloc_queue_depth[allocator];
int allocator, boolean_t io_complete)
(void) zfs_refcount_remove(&mg->mg_alloc_queue_depth[allocator], tag);
metaslab_group_increment_qdepth(mg, allocator);
int allocator)
&mg->mg_alloc_queue_depth[allocator], tag));
dva_t *dva, int d, boolean_t want_unique, uint64_t asize, int allocator,
TRACE_TOO_SMALL, allocator);
int allocator, boolean_t try_hard)
allocator = 0;
mg->mg_primaries[allocator] != NULL) {
msp = mg->mg_primaries[allocator];
ASSERT3S(msp->ms_allocator, ==, allocator);
mg->mg_secondaries[allocator] != NULL) {
msp = mg->mg_secondaries[allocator];
ASSERT3S(msp->ms_allocator, ==, allocator);
want_unique, asize, allocator, try_hard, zal,
(msp->ms_allocator != allocator || ((activation_weight ==
metaslab_activate(msp, allocator, activation_weight);
TRACE_TOO_SMALL, allocator);
TRACE_CONDENSING, allocator);
TRACE_DISABLED, allocator);
metaslab_trace_add(zal, mg, msp, asize, d, offset, allocator);
int allocator, boolean_t try_hard)
dva, d, allocator, try_hard);
TRACE_GROUP_FAILURE, allocator);
zio_alloc_list_t *zal, int allocator)
allocator);
psize, allocator, d);
TRACE_NOT_ALLOCATABLE, allocator);
TRACE_VDEV_ERROR, allocator);
!try_hard, dva, d, allocator, try_hard);
metaslab_trace_add(zal, rotor, NULL, psize, d, TRACE_ENOSPC, allocator);
metaslab_class_throttle_reserve(metaslab_class_t *mc, int slots, int allocator,
uint64_t max = mc->mc_alloc_max_slots[allocator];
zfs_refcount_count(&mc->mc_alloc_slots[allocator]);
zfs_refcount_add_few(&mc->mc_alloc_slots[allocator], slots,
int allocator, zio_t *zio)
zfs_refcount_remove_few(&mc->mc_alloc_slots[allocator], slots, zio);
zio_alloc_list_t *zal, zio_t *zio, int allocator)
txg, flags, zal, allocator);
allocator, B_FALSE);
DVA_GET_VDEV(&dva[d]), zio, flags, allocator);
zio_io_to_allocate(spa_t *spa, int allocator)
ASSERT(MUTEX_HELD(&spa->spa_alloc_locks[allocator]));
zio = avl_first(&spa->spa_alloc_trees[allocator]);
ASSERT3U(zio->io_allocator, ==, allocator);
avl_remove(&spa->spa_alloc_trees[allocator], zio);
zio_allocate_dispatch(spa_t *spa, int allocator)
mutex_enter(&spa->spa_alloc_locks[allocator]);
zio = zio_io_to_allocate(spa, allocator);
mutex_exit(&spa->spa_alloc_locks[allocator]);