/Linux-v4.19/mm/ |
D | mempool.c | 25 static void poison_error(mempool_t *pool, void *element, size_t size, in poison_error() argument 28 const int nr = pool->curr_nr; in poison_error() 34 pr_err("Mempool %p size %zu\n", pool, size); in poison_error() 42 static void __check_element(mempool_t *pool, void *element, size_t size) in __check_element() argument 51 poison_error(pool, element, size, i); in __check_element() 58 static void check_element(mempool_t *pool, void *element) in check_element() argument 61 if (pool->free == mempool_free_slab || pool->free == mempool_kfree) in check_element() 62 __check_element(pool, element, ksize(element)); in check_element() 65 if (pool->free == mempool_free_pages) { in check_element() 66 int order = (int)(long)pool->pool_data; in check_element() [all …]
|
D | zbud.c | 128 static int zbud_zpool_evict(struct zbud_pool *pool, unsigned long handle) in zbud_zpool_evict() argument 130 if (pool->zpool && pool->zpool_ops && pool->zpool_ops->evict) in zbud_zpool_evict() 131 return pool->zpool_ops->evict(pool->zpool, handle); in zbud_zpool_evict() 144 struct zbud_pool *pool; in zbud_zpool_create() local 146 pool = zbud_create_pool(gfp, zpool_ops ? &zbud_zpool_ops : NULL); in zbud_zpool_create() 147 if (pool) { in zbud_zpool_create() 148 pool->zpool = zpool; in zbud_zpool_create() 149 pool->zpool_ops = zpool_ops; in zbud_zpool_create() 151 return pool; in zbud_zpool_create() 154 static void zbud_zpool_destroy(void *pool) in zbud_zpool_destroy() argument [all …]
|
D | dmapool.c | 74 struct dma_pool *pool; in show_pools() local 84 list_for_each_entry(pool, &dev->dma_pools, pools) { in show_pools() 88 spin_lock_irq(&pool->lock); in show_pools() 89 list_for_each_entry(page, &pool->page_list, page_list) { in show_pools() 93 spin_unlock_irq(&pool->lock); in show_pools() 97 pool->name, blocks, in show_pools() 98 pages * (pool->allocation / pool->size), in show_pools() 99 pool->size, pages); in show_pools() 206 static void pool_initialise_page(struct dma_pool *pool, struct dma_page *page) in pool_initialise_page() argument 209 unsigned int next_boundary = pool->boundary; in pool_initialise_page() [all …]
|
D | z3fold.c | 42 int (*evict)(struct z3fold_pool *pool, unsigned long handle); 73 struct z3fold_pool *pool; member 168 struct z3fold_pool *pool) in init_z3fold_page() argument 187 zhdr->pool = pool; in init_z3fold_page() 251 struct z3fold_pool *pool = zhdr->pool; in __release_z3fold_page() local 256 spin_lock(&pool->lock); in __release_z3fold_page() 259 spin_unlock(&pool->lock); in __release_z3fold_page() 262 spin_lock(&pool->stale_lock); in __release_z3fold_page() 263 list_add(&zhdr->buddy, &pool->stale); in __release_z3fold_page() 264 queue_work(pool->release_wq, &pool->work); in __release_z3fold_page() [all …]
|
D | zswap.c | 165 struct zswap_pool *pool; member 212 static int zswap_writeback_entry(struct zpool *pool, unsigned long handle); 213 static int zswap_pool_get(struct zswap_pool *pool); 214 static void zswap_pool_put(struct zswap_pool *pool); 228 struct zswap_pool *pool; in zswap_update_total_size() local 233 list_for_each_entry_rcu(pool, &zswap_pools, list) in zswap_update_total_size() 234 total += zpool_get_total_size(pool->zpool); in zswap_update_total_size() 337 zpool_free(entry->pool->zpool, entry->handle); in zswap_free_entry() 338 zswap_pool_put(entry->pool); in zswap_free_entry() 409 struct zswap_pool *pool = hlist_entry(node, struct zswap_pool, node); in zswap_cpu_comp_prepare() local [all …]
|
/Linux-v4.19/drivers/staging/android/ion/ |
D | ion_page_pool.c | 14 static inline struct page *ion_page_pool_alloc_pages(struct ion_page_pool *pool) in ion_page_pool_alloc_pages() argument 16 return alloc_pages(pool->gfp_mask, pool->order); in ion_page_pool_alloc_pages() 19 static void ion_page_pool_free_pages(struct ion_page_pool *pool, in ion_page_pool_free_pages() argument 22 __free_pages(page, pool->order); in ion_page_pool_free_pages() 25 static void ion_page_pool_add(struct ion_page_pool *pool, struct page *page) in ion_page_pool_add() argument 27 mutex_lock(&pool->mutex); in ion_page_pool_add() 29 list_add_tail(&page->lru, &pool->high_items); in ion_page_pool_add() 30 pool->high_count++; in ion_page_pool_add() 32 list_add_tail(&page->lru, &pool->low_items); in ion_page_pool_add() 33 pool->low_count++; in ion_page_pool_add() [all …]
|
/Linux-v4.19/net/core/ |
D | page_pool.c | 17 static int page_pool_init(struct page_pool *pool, in page_pool_init() argument 22 memcpy(&pool->p, params, sizeof(pool->p)); in page_pool_init() 25 if (pool->p.flags & ~(PP_FLAG_ALL)) in page_pool_init() 28 if (pool->p.pool_size) in page_pool_init() 29 ring_qsize = pool->p.pool_size; in page_pool_init() 39 if ((pool->p.dma_dir != DMA_FROM_DEVICE) && in page_pool_init() 40 (pool->p.dma_dir != DMA_BIDIRECTIONAL)) in page_pool_init() 43 if (ptr_ring_init(&pool->ring, ring_qsize, GFP_KERNEL) < 0) in page_pool_init() 51 struct page_pool *pool; in page_pool_create() local 54 pool = kzalloc_node(sizeof(*pool), GFP_KERNEL, params->nid); in page_pool_create() [all …]
|
/Linux-v4.19/drivers/infiniband/core/ |
D | fmr_pool.c | 95 void (*flush_function)(struct ib_fmr_pool *pool, 115 static inline struct ib_pool_fmr *ib_fmr_cache_lookup(struct ib_fmr_pool *pool, in ib_fmr_cache_lookup() argument 123 if (!pool->cache_bucket) in ib_fmr_cache_lookup() 126 bucket = pool->cache_bucket + ib_fmr_hash(*page_list); in ib_fmr_cache_lookup() 138 static void ib_fmr_batch_release(struct ib_fmr_pool *pool) in ib_fmr_batch_release() argument 145 spin_lock_irq(&pool->pool_lock); in ib_fmr_batch_release() 147 list_for_each_entry(fmr, &pool->dirty_list, list) { in ib_fmr_batch_release() 160 list_splice_init(&pool->dirty_list, &unmap_list); in ib_fmr_batch_release() 161 pool->dirty_len = 0; in ib_fmr_batch_release() 163 spin_unlock_irq(&pool->pool_lock); in ib_fmr_batch_release() [all …]
|
/Linux-v4.19/sound/core/seq/ |
D | seq_memory.c | 36 static inline int snd_seq_pool_available(struct snd_seq_pool *pool) in snd_seq_pool_available() argument 38 return pool->total_elements - atomic_read(&pool->counter); in snd_seq_pool_available() 41 static inline int snd_seq_output_ok(struct snd_seq_pool *pool) in snd_seq_output_ok() argument 43 return snd_seq_pool_available(pool) >= pool->room; in snd_seq_output_ok() 177 static inline void free_cell(struct snd_seq_pool *pool, in free_cell() argument 180 cell->next = pool->free; in free_cell() 181 pool->free = cell; in free_cell() 182 atomic_dec(&pool->counter); in free_cell() 188 struct snd_seq_pool *pool; in snd_seq_cell_free() local 192 pool = cell->pool; in snd_seq_cell_free() [all …]
|
D | seq_memory.h | 32 struct snd_seq_pool *pool; /* used pool */ member 68 int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event, 73 static inline int snd_seq_unused_cells(struct snd_seq_pool *pool) in snd_seq_unused_cells() argument 75 return pool ? pool->total_elements - atomic_read(&pool->counter) : 0; in snd_seq_unused_cells() 79 static inline int snd_seq_total_cells(struct snd_seq_pool *pool) in snd_seq_total_cells() argument 81 return pool ? pool->total_elements : 0; in snd_seq_total_cells() 85 int snd_seq_pool_init(struct snd_seq_pool *pool); 88 void snd_seq_pool_mark_closing(struct snd_seq_pool *pool); 89 int snd_seq_pool_done(struct snd_seq_pool *pool); 95 int snd_seq_pool_delete(struct snd_seq_pool **pool); [all …]
|
/Linux-v4.19/drivers/infiniband/sw/rxe/ |
D | rxe_pool.c | 105 static inline const char *pool_name(struct rxe_pool *pool) in pool_name() argument 107 return rxe_type_info[pool->type].name; in pool_name() 110 static inline struct kmem_cache *pool_cache(struct rxe_pool *pool) in pool_cache() argument 112 return rxe_type_info[pool->type].cache; in pool_cache() 159 static int rxe_pool_init_index(struct rxe_pool *pool, u32 max, u32 min) in rxe_pool_init_index() argument 164 if ((max - min + 1) < pool->max_elem) { in rxe_pool_init_index() 170 pool->max_index = max; in rxe_pool_init_index() 171 pool->min_index = min; in rxe_pool_init_index() 174 pool->table = kmalloc(size, GFP_KERNEL); in rxe_pool_init_index() 175 if (!pool->table) { in rxe_pool_init_index() [all …]
|
/Linux-v4.19/drivers/md/ |
D | dm-thin.c | 229 struct pool { struct 285 static enum pool_mode get_pool_mode(struct pool *pool); argument 286 static void metadata_operation_failed(struct pool *pool, const char *op, int r); 293 struct pool *pool; member 313 struct pool *pool; member 334 static bool block_size_is_power_of_two(struct pool *pool) in block_size_is_power_of_two() argument 336 return pool->sectors_per_block_shift >= 0; in block_size_is_power_of_two() 339 static sector_t block_to_sectors(struct pool *pool, dm_block_t b) in block_to_sectors() argument 341 return block_size_is_power_of_two(pool) ? in block_to_sectors() 342 (b << pool->sectors_per_block_shift) : in block_to_sectors() [all …]
|
/Linux-v4.19/net/ceph/ |
D | msgpool.c | 14 struct ceph_msgpool *pool = arg; in msgpool_alloc() local 17 msg = ceph_msg_new(pool->type, pool->front_len, gfp_mask, true); in msgpool_alloc() 19 dout("msgpool_alloc %s failed\n", pool->name); in msgpool_alloc() 21 dout("msgpool_alloc %s %p\n", pool->name, msg); in msgpool_alloc() 22 msg->pool = pool; in msgpool_alloc() 29 struct ceph_msgpool *pool = arg; in msgpool_free() local 32 dout("msgpool_release %s %p\n", pool->name, msg); in msgpool_free() 33 msg->pool = NULL; in msgpool_free() 37 int ceph_msgpool_init(struct ceph_msgpool *pool, int type, in ceph_msgpool_init() argument 41 pool->type = type; in ceph_msgpool_init() [all …]
|
/Linux-v4.19/drivers/gpu/drm/ttm/ |
D | ttm_page_alloc_dma.c | 151 struct dma_pool *pool; member 266 static int ttm_set_pages_caching(struct dma_pool *pool, in ttm_set_pages_caching() argument 271 if (pool->type & IS_UC) { in ttm_set_pages_caching() 275 pool->dev_name, cpages); in ttm_set_pages_caching() 277 if (pool->type & IS_WC) { in ttm_set_pages_caching() 281 pool->dev_name, cpages); in ttm_set_pages_caching() 286 static void __ttm_dma_free_page(struct dma_pool *pool, struct dma_page *d_page) in __ttm_dma_free_page() argument 290 dma_free_coherent(pool->dev, pool->size, (void *)d_page->vaddr, dma); in __ttm_dma_free_page() 295 static struct dma_page *__ttm_dma_alloc_page(struct dma_pool *pool) in __ttm_dma_alloc_page() argument 305 if (pool->type & IS_HUGE) in __ttm_dma_alloc_page() [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/dce80/ |
D | dce80_resource.c | 668 static void destruct(struct dce110_resource_pool *pool) in destruct() argument 672 for (i = 0; i < pool->base.pipe_count; i++) { in destruct() 673 if (pool->base.opps[i] != NULL) in destruct() 674 dce110_opp_destroy(&pool->base.opps[i]); in destruct() 676 if (pool->base.transforms[i] != NULL) in destruct() 677 dce80_transform_destroy(&pool->base.transforms[i]); in destruct() 679 if (pool->base.ipps[i] != NULL) in destruct() 680 dce_ipp_destroy(&pool->base.ipps[i]); in destruct() 682 if (pool->base.mis[i] != NULL) { in destruct() 683 kfree(TO_DCE_MEM_INPUT(pool->base.mis[i])); in destruct() [all …]
|
/Linux-v4.19/net/rds/ |
D | ib_rdma.c | 194 struct rds_ib_mr *rds_ib_reuse_mr(struct rds_ib_mr_pool *pool) in rds_ib_reuse_mr() argument 203 ret = llist_del_first(&pool->clean_list); in rds_ib_reuse_mr() 206 if (pool->pool_type == RDS_IB_MR_8K_POOL) in rds_ib_reuse_mr() 283 struct rds_ib_mr_pool *pool = ibmr->pool; in rds_ib_teardown_mr() local 285 atomic_sub(pinned, &pool->free_pinned); in rds_ib_teardown_mr() 289 static inline unsigned int rds_ib_flush_goal(struct rds_ib_mr_pool *pool, int free_all) in rds_ib_flush_goal() argument 293 item_count = atomic_read(&pool->item_count); in rds_ib_flush_goal() 327 static void list_to_llist_nodes(struct rds_ib_mr_pool *pool, in list_to_llist_nodes() argument 351 int rds_ib_flush_mr_pool(struct rds_ib_mr_pool *pool, in rds_ib_flush_mr_pool() argument 361 if (pool->pool_type == RDS_IB_MR_8K_POOL) in rds_ib_flush_mr_pool() [all …]
|
/Linux-v4.19/lib/ |
D | genalloc.c | 154 struct gen_pool *pool; in gen_pool_create() local 156 pool = kmalloc_node(sizeof(struct gen_pool), GFP_KERNEL, nid); in gen_pool_create() 157 if (pool != NULL) { in gen_pool_create() 158 spin_lock_init(&pool->lock); in gen_pool_create() 159 INIT_LIST_HEAD(&pool->chunks); in gen_pool_create() 160 pool->min_alloc_order = min_alloc_order; in gen_pool_create() 161 pool->algo = gen_pool_first_fit; in gen_pool_create() 162 pool->data = NULL; in gen_pool_create() 163 pool->name = NULL; in gen_pool_create() 165 return pool; in gen_pool_create() [all …]
|
/Linux-v4.19/drivers/media/platform/vsp1/ |
D | vsp1_dl.c | 110 struct vsp1_dl_body_pool *pool; member 227 struct vsp1_dl_body_pool *pool; member 251 struct vsp1_dl_body_pool *pool; in vsp1_dl_body_pool_create() local 255 pool = kzalloc(sizeof(*pool), GFP_KERNEL); in vsp1_dl_body_pool_create() 256 if (!pool) in vsp1_dl_body_pool_create() 259 pool->vsp1 = vsp1; in vsp1_dl_body_pool_create() 268 pool->size = dlb_size * num_bodies; in vsp1_dl_body_pool_create() 270 pool->bodies = kcalloc(num_bodies, sizeof(*pool->bodies), GFP_KERNEL); in vsp1_dl_body_pool_create() 271 if (!pool->bodies) { in vsp1_dl_body_pool_create() 272 kfree(pool); in vsp1_dl_body_pool_create() [all …]
|
/Linux-v4.19/drivers/staging/octeon/ |
D | ethernet-mem.c | 27 static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements) in cvm_oct_fill_hw_skbuff() argument 38 cvmx_fpa_free(skb->data, pool, size / 128); in cvm_oct_fill_hw_skbuff() 50 static void cvm_oct_free_hw_skbuff(int pool, int size, int elements) in cvm_oct_free_hw_skbuff() argument 55 memory = cvmx_fpa_alloc(pool); in cvm_oct_free_hw_skbuff() 66 pool, elements); in cvm_oct_free_hw_skbuff() 69 pool, elements); in cvm_oct_free_hw_skbuff() 80 static int cvm_oct_fill_hw_memory(int pool, int size, int elements) in cvm_oct_fill_hw_memory() argument 100 elements * size, pool); in cvm_oct_fill_hw_memory() 105 cvmx_fpa_free(fpa, pool, 0); in cvm_oct_fill_hw_memory() 117 static void cvm_oct_free_hw_memory(int pool, int size, int elements) in cvm_oct_free_hw_memory() argument [all …]
|
/Linux-v4.19/kernel/ |
D | workqueue.c | 199 struct worker_pool *pool; /* I: the associated pool */ member 375 #define for_each_cpu_worker_pool(pool, cpu) \ argument 376 for ((pool) = &per_cpu(cpu_worker_pools, cpu)[0]; \ 377 (pool) < &per_cpu(cpu_worker_pools, cpu)[NR_STD_WORKER_POOLS]; \ 378 (pool)++) 392 #define for_each_pool(pool, pi) \ argument 393 idr_for_each_entry(&worker_pool_idr, pool, pi) \ 407 #define for_each_pool_worker(worker, pool) \ argument 408 list_for_each_entry((worker), &(pool)->workers, node) \ 533 static int worker_pool_assign_id(struct worker_pool *pool) in worker_pool_assign_id() argument [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/dce100/ |
D | dce100_resource.c | 635 static void destruct(struct dce110_resource_pool *pool) in destruct() argument 639 for (i = 0; i < pool->base.pipe_count; i++) { in destruct() 640 if (pool->base.opps[i] != NULL) in destruct() 641 dce110_opp_destroy(&pool->base.opps[i]); in destruct() 643 if (pool->base.transforms[i] != NULL) in destruct() 644 dce100_transform_destroy(&pool->base.transforms[i]); in destruct() 646 if (pool->base.ipps[i] != NULL) in destruct() 647 dce_ipp_destroy(&pool->base.ipps[i]); in destruct() 649 if (pool->base.mis[i] != NULL) { in destruct() 650 kfree(TO_DCE_MEM_INPUT(pool->base.mis[i])); in destruct() [all …]
|
/Linux-v4.19/drivers/dma/ |
D | coh901318_lli.c | 19 #define DEBUGFS_POOL_COUNTER_RESET(pool) (pool->debugfs_pool_counter = 0) argument 20 #define DEBUGFS_POOL_COUNTER_ADD(pool, add) (pool->debugfs_pool_counter += add) argument 22 #define DEBUGFS_POOL_COUNTER_RESET(pool) argument 23 #define DEBUGFS_POOL_COUNTER_ADD(pool, add) argument 35 int coh901318_pool_create(struct coh901318_pool *pool, in coh901318_pool_create() argument 39 spin_lock_init(&pool->lock); in coh901318_pool_create() 40 pool->dev = dev; in coh901318_pool_create() 41 pool->dmapool = dma_pool_create("lli_pool", dev, size, align, 0); in coh901318_pool_create() 43 DEBUGFS_POOL_COUNTER_RESET(pool); in coh901318_pool_create() 47 int coh901318_pool_destroy(struct coh901318_pool *pool) in coh901318_pool_destroy() argument [all …]
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_cnt.c | 70 struct mlxsw_sp_counter_pool *pool; in mlxsw_sp_counter_pool_init() local 87 pool = kzalloc(sizeof(*pool), GFP_KERNEL); in mlxsw_sp_counter_pool_init() 88 if (!pool) in mlxsw_sp_counter_pool_init() 91 pool->pool_size = MLXSW_CORE_RES_GET(mlxsw_sp->core, COUNTER_POOL_SIZE); in mlxsw_sp_counter_pool_init() 92 map_size = BITS_TO_LONGS(pool->pool_size) * sizeof(unsigned long); in mlxsw_sp_counter_pool_init() 94 pool->usage = kzalloc(map_size, GFP_KERNEL); in mlxsw_sp_counter_pool_init() 95 if (!pool->usage) { in mlxsw_sp_counter_pool_init() 100 pool->sub_pools = mlxsw_sp_counter_sub_pools; in mlxsw_sp_counter_pool_init() 106 sub_pool = &pool->sub_pools[i]; in mlxsw_sp_counter_pool_init() 112 if (sub_pool->base_index + sub_pool->size > pool->pool_size) in mlxsw_sp_counter_pool_init() [all …]
|
/Linux-v4.19/include/linux/ |
D | zpool.h | 18 int (*evict)(struct zpool *pool, unsigned long handle); 45 const char *zpool_get_type(struct zpool *pool); 47 void zpool_destroy_pool(struct zpool *pool); 49 int zpool_malloc(struct zpool *pool, size_t size, gfp_t gfp, 52 void zpool_free(struct zpool *pool, unsigned long handle); 54 int zpool_shrink(struct zpool *pool, unsigned int pages, 57 void *zpool_map_handle(struct zpool *pool, unsigned long handle, 60 void zpool_unmap_handle(struct zpool *pool, unsigned long handle); 62 u64 zpool_get_total_size(struct zpool *pool); 91 void (*destroy)(void *pool); [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/dcn10/ |
D | dcn10_resource.c | 815 static void destruct(struct dcn10_resource_pool *pool) in destruct() argument 819 for (i = 0; i < pool->base.stream_enc_count; i++) { in destruct() 820 if (pool->base.stream_enc[i] != NULL) { in destruct() 824 kfree(pool->base.stream_enc[i]); in destruct() 825 pool->base.stream_enc[i] = NULL; in destruct() 829 if (pool->base.mpc != NULL) { in destruct() 830 kfree(TO_DCN10_MPC(pool->base.mpc)); in destruct() 831 pool->base.mpc = NULL; in destruct() 834 if (pool->base.hubbub != NULL) { in destruct() 835 kfree(pool->base.hubbub); in destruct() [all …]
|