Home
last modified time | relevance | path

Searched full:pool (Results 1 – 25 of 1674) sorted by relevance

12345678910>>...67

/linux-6.14.4/net/xdp/
Dxsk_buff_pool.c11 void xp_add_xsk(struct xsk_buff_pool *pool, struct xdp_sock *xs) in xp_add_xsk() argument
18 spin_lock_irqsave(&pool->xsk_tx_list_lock, flags); in xp_add_xsk()
19 list_add_rcu(&xs->tx_list, &pool->xsk_tx_list); in xp_add_xsk()
20 spin_unlock_irqrestore(&pool->xsk_tx_list_lock, flags); in xp_add_xsk()
23 void xp_del_xsk(struct xsk_buff_pool *pool, struct xdp_sock *xs) in xp_del_xsk() argument
30 spin_lock_irqsave(&pool->xsk_tx_list_lock, flags); in xp_del_xsk()
32 spin_unlock_irqrestore(&pool->xsk_tx_list_lock, flags); in xp_del_xsk()
35 void xp_destroy(struct xsk_buff_pool *pool) in xp_destroy() argument
37 if (!pool) in xp_destroy()
40 kvfree(pool->tx_descs); in xp_destroy()
[all …]
/linux-6.14.4/drivers/net/ethernet/ti/
Dk3-cppi-desc-pool.c2 /* TI K3 CPPI5 descriptors pool API
15 #include "k3-cppi-desc-pool.h"
28 void k3_cppi_desc_pool_destroy(struct k3_cppi_desc_pool *pool) in k3_cppi_desc_pool_destroy() argument
30 if (!pool) in k3_cppi_desc_pool_destroy()
33 WARN(gen_pool_size(pool->gen_pool) != gen_pool_avail(pool->gen_pool), in k3_cppi_desc_pool_destroy()
35 gen_pool_size(pool->gen_pool), in k3_cppi_desc_pool_destroy()
36 gen_pool_avail(pool->gen_pool)); in k3_cppi_desc_pool_destroy()
37 if (pool->cpumem) in k3_cppi_desc_pool_destroy()
38 dma_free_coherent(pool->dev, pool->mem_size, pool->cpumem, in k3_cppi_desc_pool_destroy()
39 pool->dma_addr); in k3_cppi_desc_pool_destroy()
[all …]
/linux-6.14.4/net/core/
Dpage_pool.c43 #define alloc_stat_inc(pool, __stat) (pool->alloc_stats.__stat++) argument
45 #define recycle_stat_inc(pool, __stat) \ argument
47 struct page_pool_recycle_stats __percpu *s = pool->recycle_stats; \
51 #define recycle_stat_add(pool, __stat, val) \ argument
53 struct page_pool_recycle_stats __percpu *s = pool->recycle_stats; \
72 * page_pool_get_stats() - fetch page pool stats
73 * @pool: pool from which page was allocated
82 bool page_pool_get_stats(const struct page_pool *pool, in page_pool_get_stats() argument
91 stats->alloc_stats.fast += pool->alloc_stats.fast; in page_pool_get_stats()
92 stats->alloc_stats.slow += pool->alloc_stats.slow; in page_pool_get_stats()
[all …]
/linux-6.14.4/mm/
Dmempool.c5 * memory buffer pool support. Such pools are mostly used
24 static void poison_error(mempool_t *pool, void *element, size_t size, in poison_error() argument
27 const int nr = pool->curr_nr; in poison_error()
33 pr_err("Mempool %p size %zu\n", pool, size); in poison_error()
41 static void __check_element(mempool_t *pool, void *element, size_t size) in __check_element() argument
50 poison_error(pool, element, size, i); in __check_element()
57 static void check_element(mempool_t *pool, void *element) in check_element() argument
64 if (pool->free == mempool_kfree) { in check_element()
65 __check_element(pool, element, (size_t)pool->pool_data); in check_element()
66 } else if (pool->free == mempool_free_slab) { in check_element()
[all …]
Ddmapool.c3 * DMA Pool allocator
14 * The current design of this allocator is fairly simple. The pool is
48 struct dma_pool { /* the pool */
74 struct dma_pool *pool; in pools_show() local
80 list_for_each_entry(pool, &dev->dma_pools, pools) { in pools_show()
81 /* per-pool info, no real statistics yet */ in pools_show()
83 pool->name, pool->nr_active, in pools_show()
84 pool->nr_blocks, pool->size, in pools_show()
85 pool->nr_pages); in pools_show()
95 static void pool_check_block(struct dma_pool *pool, struct dma_block *block, in pool_check_block() argument
[all …]
/linux-6.14.4/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/
Dpool.c9 switch (resource->pool->type) { in hws_pool_free_one_resource()
11 mlx5hws_cmd_ste_destroy(resource->pool->ctx->mdev, resource->base_id); in hws_pool_free_one_resource()
14 mlx5hws_cmd_stc_destroy(resource->pool->ctx->mdev, resource->base_id); in hws_pool_free_one_resource()
23 static void hws_pool_resource_free(struct mlx5hws_pool *pool, in hws_pool_resource_free() argument
26 hws_pool_free_one_resource(pool->resource[resource_idx]); in hws_pool_resource_free()
27 pool->resource[resource_idx] = NULL; in hws_pool_resource_free()
29 if (pool->tbl_type == MLX5HWS_TABLE_TYPE_FDB) { in hws_pool_resource_free()
30 hws_pool_free_one_resource(pool->mirror_resource[resource_idx]); in hws_pool_resource_free()
31 pool->mirror_resource[resource_idx] = NULL; in hws_pool_resource_free()
36 hws_pool_create_one_resource(struct mlx5hws_pool *pool, u32 log_range, in hws_pool_create_one_resource() argument
[all …]
/linux-6.14.4/drivers/md/
Ddm-thin.c42 * The block size of the device holding pool data must be
194 * A pool device ties together a metadata device and a data device. It
201 * The pool runs in various modes. Ordered in degraded order for comparisons.
232 struct pool { struct
234 struct dm_target *ti; /* Only set if a pool target is bound */ argument
290 static void metadata_operation_failed(struct pool *pool, const char *op, int r); argument
292 static enum pool_mode get_pool_mode(struct pool *pool) in get_pool_mode() argument
294 return pool->pf.mode; in get_pool_mode()
297 static void notify_of_pool_mode_change(struct pool *pool) in notify_of_pool_mode_change() argument
307 enum pool_mode mode = get_pool_mode(pool); in notify_of_pool_mode_change()
[all …]
/linux-6.14.4/drivers/gpu/drm/panthor/
Dpanthor_heap.c78 * struct panthor_heap_pool - Pool of heap contexts
80 * The pool is attached to a panthor_file and can't be shared across processes.
89 /** @vm: VM this pool is bound to. */
101 /** @size: Size of all chunks across all heaps in the pool. */
113 static int panthor_get_heap_ctx_offset(struct panthor_heap_pool *pool, int id) in panthor_get_heap_ctx_offset() argument
115 return panthor_heap_ctx_stride(pool->ptdev) * id; in panthor_get_heap_ctx_offset()
118 static void *panthor_get_heap_ctx(struct panthor_heap_pool *pool, int id) in panthor_get_heap_ctx() argument
120 return pool->gpu_contexts->kmap + in panthor_get_heap_ctx()
121 panthor_get_heap_ctx_offset(pool, id); in panthor_get_heap_ctx()
124 static void panthor_free_heap_chunk(struct panthor_heap_pool *pool, in panthor_free_heap_chunk() argument
[all …]
/linux-6.14.4/sound/core/seq/
Dseq_memory.c22 static inline int snd_seq_pool_available(struct snd_seq_pool *pool) in snd_seq_pool_available() argument
24 return pool->total_elements - atomic_read(&pool->counter); in snd_seq_pool_available()
27 static inline int snd_seq_output_ok(struct snd_seq_pool *pool) in snd_seq_output_ok() argument
29 return snd_seq_pool_available(pool) >= pool->room; in snd_seq_output_ok()
225 static inline void free_cell(struct snd_seq_pool *pool, in free_cell() argument
228 cell->next = pool->free; in free_cell()
229 pool->free = cell; in free_cell()
230 atomic_dec(&pool->counter); in free_cell()
235 struct snd_seq_pool *pool; in snd_seq_cell_free() local
239 pool = cell->pool; in snd_seq_cell_free()
[all …]
/linux-6.14.4/net/ceph/
Dmsgpool.c14 struct ceph_msgpool *pool = arg; in msgpool_alloc() local
17 msg = ceph_msg_new2(pool->type, pool->front_len, pool->max_data_items, in msgpool_alloc()
20 dout("msgpool_alloc %s failed\n", pool->name); in msgpool_alloc()
22 dout("msgpool_alloc %s %p\n", pool->name, msg); in msgpool_alloc()
23 msg->pool = pool; in msgpool_alloc()
30 struct ceph_msgpool *pool = arg; in msgpool_free() local
33 dout("msgpool_release %s %p\n", pool->name, msg); in msgpool_free()
34 msg->pool = NULL; in msgpool_free()
38 int ceph_msgpool_init(struct ceph_msgpool *pool, int type, in ceph_msgpool_init() argument
43 pool->type = type; in ceph_msgpool_init()
[all …]
/linux-6.14.4/lib/
Dgenalloc.c16 * available. If new memory is added to the pool a lock has to be
146 * gen_pool_create - create a new special memory pool
148 * @nid: node id of the node the pool structure should be allocated on, or -1
150 * Create a new special memory pool that can be used to manage special purpose
155 struct gen_pool *pool; in gen_pool_create() local
157 pool = kmalloc_node(sizeof(struct gen_pool), GFP_KERNEL, nid); in gen_pool_create()
158 if (pool != NULL) { in gen_pool_create()
159 spin_lock_init(&pool->lock); in gen_pool_create()
160 INIT_LIST_HEAD(&pool->chunks); in gen_pool_create()
161 pool->min_alloc_order = min_alloc_order; in gen_pool_create()
[all …]
Dobjpool.c19 objpool_init_percpu_slot(struct objpool_head *pool, in objpool_init_percpu_slot() argument
24 void *obj = (void *)&slot->entries[pool->capacity]; in objpool_init_percpu_slot()
28 slot->mask = pool->capacity - 1; in objpool_init_percpu_slot()
37 obj = obj + pool->obj_size; in objpool_init_percpu_slot()
40 pool->nr_objs++; in objpool_init_percpu_slot()
48 objpool_init_percpu_slots(struct objpool_head *pool, int nr_objs, in objpool_init_percpu_slots() argument
63 nodes = nr_objs / pool->nr_possible_cpus; in objpool_init_percpu_slots()
64 if (cpu_count < (nr_objs % pool->nr_possible_cpus)) in objpool_init_percpu_slots()
68 size = struct_size(slot, entries, pool->capacity) + in objpool_init_percpu_slots()
69 pool->obj_size * nodes; in objpool_init_percpu_slots()
[all …]
/linux-6.14.4/drivers/staging/media/atomisp/pci/runtime/rmgr/src/
Drmgr_vbuf.c22 * @brief VBUF resource pool - refpool
27 * @brief VBUF resource pool - writepool
34 * @brief VBUF resource pool - hmmbufferpool
115 * @brief Initialize the resource pool (host, vbuf)
117 * @param pool The pointer to the pool
119 int ia_css_rmgr_init_vbuf(struct ia_css_rmgr_vbuf_pool *pool) in ia_css_rmgr_init_vbuf() argument
125 assert(pool); in ia_css_rmgr_init_vbuf()
126 if (!pool) in ia_css_rmgr_init_vbuf()
128 /* initialize the recycle pool if used */ in ia_css_rmgr_init_vbuf()
129 if (pool->recycle && pool->size) { in ia_css_rmgr_init_vbuf()
[all …]
/linux-6.14.4/include/net/
Dxdp_sock_drv.h23 void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries);
24 bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc);
25 u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max);
26 void xsk_tx_release(struct xsk_buff_pool *pool);
29 void xsk_set_rx_need_wakeup(struct xsk_buff_pool *pool);
30 void xsk_set_tx_need_wakeup(struct xsk_buff_pool *pool);
31 void xsk_clear_rx_need_wakeup(struct xsk_buff_pool *pool);
32 void xsk_clear_tx_need_wakeup(struct xsk_buff_pool *pool);
33 bool xsk_uses_need_wakeup(struct xsk_buff_pool *pool);
35 static inline u32 xsk_pool_get_headroom(struct xsk_buff_pool *pool) in xsk_pool_get_headroom() argument
[all …]
/linux-6.14.4/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/
Ddr_icm_pool.c24 struct mutex mutex; /* protect the ICM pool and ICM buddy */
82 u32 offset = mlx5dr_icm_pool_dm_type_to_entry_size(chunk->buddy_mem->pool->icm_type); in mlx5dr_icm_pool_get_chunk_mr_addr()
94 u32 size = mlx5dr_icm_pool_dm_type_to_entry_size(chunk->buddy_mem->pool->icm_type); in mlx5dr_icm_pool_get_chunk_icm_addr()
102 chunk->buddy_mem->pool->icm_type); in mlx5dr_icm_pool_get_chunk_byte_size()
111 dr_icm_pool_mr_create(struct mlx5dr_icm_pool *pool) in dr_icm_pool_mr_create() argument
113 struct mlx5_core_dev *mdev = pool->dmn->mdev; in dr_icm_pool_mr_create()
123 icm_mr->dmn = pool->dmn; in dr_icm_pool_mr_create()
125 icm_mr->dm.length = mlx5dr_icm_pool_chunk_size_to_byte(pool->max_log_chunk_sz, in dr_icm_pool_mr_create()
126 pool->icm_type); in dr_icm_pool_mr_create()
128 switch (pool->icm_type) { in dr_icm_pool_mr_create()
[all …]
/linux-6.14.4/kernel/cgroup/
Ddmem.c106 static void free_cg_pool(struct dmem_cgroup_pool_state *pool) in free_cg_pool() argument
108 list_del(&pool->region_node); in free_cg_pool()
109 kfree(pool); in free_cg_pool()
113 set_resource_min(struct dmem_cgroup_pool_state *pool, u64 val) in set_resource_min() argument
115 page_counter_set_min(&pool->cnt, val); in set_resource_min()
119 set_resource_low(struct dmem_cgroup_pool_state *pool, u64 val) in set_resource_low() argument
121 page_counter_set_low(&pool->cnt, val); in set_resource_low()
125 set_resource_max(struct dmem_cgroup_pool_state *pool, u64 val) in set_resource_max() argument
127 page_counter_set_max(&pool->cnt, val); in set_resource_max()
130 static u64 get_resource_low(struct dmem_cgroup_pool_state *pool) in get_resource_low() argument
[all …]
/linux-6.14.4/drivers/staging/octeon/
Dethernet-mem.c17 * cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs
18 * @pool: Pool to allocate an skbuff for
19 * @size: Size of the buffer needed for the pool
24 static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements) in cvm_oct_fill_hw_skbuff() argument
35 cvmx_fpa_free(skb->data, pool, size / 128); in cvm_oct_fill_hw_skbuff()
42 * cvm_oct_free_hw_skbuff- free hardware pool skbuffs
43 * @pool: Pool to allocate an skbuff for
44 * @size: Size of the buffer needed for the pool
47 static void cvm_oct_free_hw_skbuff(int pool, int size, int elements) in cvm_oct_free_hw_skbuff() argument
52 memory = cvmx_fpa_alloc(pool); in cvm_oct_free_hw_skbuff()
[all …]
/linux-6.14.4/drivers/net/ethernet/mellanox/mlx5/core/lib/
Dcrypto.c13 * (for example, TLS) after last revalidation in a pool or a bulk.
19 #define MLX5_CRYPTO_DEK_POOL_CALC_FREED(pool) MLX5_CRYPTO_DEK_CALC_FREED(pool) argument
33 int num_deks; /* the total number of keys in this pool */
34 int avail_deks; /* the number of available keys in this pool */
35 int in_use_deks; /* the number of being used keys in this pool */
288 mlx5_crypto_dek_bulk_create(struct mlx5_crypto_dek_pool *pool) in mlx5_crypto_dek_bulk_create() argument
290 struct mlx5_crypto_dek_priv *dek_priv = pool->mdev->mlx5e_res.dek_priv; in mlx5_crypto_dek_bulk_create()
291 struct mlx5_core_dev *mdev = pool->mdev; in mlx5_crypto_dek_bulk_create()
313 err = mlx5_crypto_create_dek_bulk(mdev, pool->key_purpose, in mlx5_crypto_dek_bulk_create()
334 mlx5_crypto_dek_pool_add_bulk(struct mlx5_crypto_dek_pool *pool) in mlx5_crypto_dek_pool_add_bulk() argument
[all …]
/linux-6.14.4/tools/testing/selftests/drivers/net/mlxsw/
Dsharedbuffer_configuration.py16 objects, pool, tcbind and portpool. Provide an interface to get random
18 1. Pool:
22 - random pool number
30 for pool in pools:
31 self._pools.append(pool)
47 def _get_th(self, pool): argument
50 if pool["thtype"] == "dynamic":
58 for pool in self._pools:
59 if pool["type"] == "ingress":
60 ing_pools.append(pool)
[all …]
/linux-6.14.4/drivers/gpu/drm/ttm/tests/
Dttm_pool_test.c79 struct ttm_pool *pool; in ttm_pool_pre_populated() local
86 pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL); in ttm_pool_pre_populated()
87 KUNIT_ASSERT_NOT_NULL(test, pool); in ttm_pool_pre_populated()
89 ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, true, false); in ttm_pool_pre_populated()
91 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_pre_populated()
94 ttm_pool_free(pool, tt); in ttm_pool_pre_populated()
97 return pool; in ttm_pool_pre_populated()
140 struct ttm_pool *pool; in ttm_pool_alloc_basic() local
150 pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL); in ttm_pool_alloc_basic()
151 KUNIT_ASSERT_NOT_NULL(test, pool); in ttm_pool_alloc_basic()
[all …]
/linux-6.14.4/drivers/gpu/drm/amd/display/dc/resource/dce80/
Ddce80_resource.c803 static void dce80_resource_destruct(struct dce110_resource_pool *pool) in dce80_resource_destruct() argument
807 for (i = 0; i < pool->base.pipe_count; i++) { in dce80_resource_destruct()
808 if (pool->base.opps[i] != NULL) in dce80_resource_destruct()
809 dce110_opp_destroy(&pool->base.opps[i]); in dce80_resource_destruct()
811 if (pool->base.transforms[i] != NULL) in dce80_resource_destruct()
812 dce80_transform_destroy(&pool->base.transforms[i]); in dce80_resource_destruct()
814 if (pool->base.ipps[i] != NULL) in dce80_resource_destruct()
815 dce_ipp_destroy(&pool->base.ipps[i]); in dce80_resource_destruct()
817 if (pool->base.mis[i] != NULL) { in dce80_resource_destruct()
818 kfree(TO_DCE_MEM_INPUT(pool->base.mis[i])); in dce80_resource_destruct()
[all …]
/linux-6.14.4/include/linux/
Dgenalloc.h16 * available. If new memory is added to the pool a lock has to be
46 * @pool: the pool being allocated from
52 void *data, struct gen_pool *pool,
56 * General purpose special memory pool descriptor.
60 struct list_head chunks; /* list of chunks in this pool */
70 * General purpose special memory pool chunk descriptor.
73 struct list_head next_chunk; /* next chunk in pool */
97 extern phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long);
101 static inline int gen_pool_add_virt(struct gen_pool *pool, unsigned long addr, in gen_pool_add_virt() argument
104 return gen_pool_add_owner(pool, addr, phys, size, nid, NULL); in gen_pool_add_virt()
[all …]
/linux-6.14.4/drivers/gpu/drm/amd/display/dc/dce60/
Ddce60_resource.c797 static void dce60_resource_destruct(struct dce110_resource_pool *pool) in dce60_resource_destruct() argument
801 for (i = 0; i < pool->base.pipe_count; i++) { in dce60_resource_destruct()
802 if (pool->base.opps[i] != NULL) in dce60_resource_destruct()
803 dce110_opp_destroy(&pool->base.opps[i]); in dce60_resource_destruct()
805 if (pool->base.transforms[i] != NULL) in dce60_resource_destruct()
806 dce60_transform_destroy(&pool->base.transforms[i]); in dce60_resource_destruct()
808 if (pool->base.ipps[i] != NULL) in dce60_resource_destruct()
809 dce_ipp_destroy(&pool->base.ipps[i]); in dce60_resource_destruct()
811 if (pool->base.mis[i] != NULL) { in dce60_resource_destruct()
812 kfree(TO_DCE_MEM_INPUT(pool->base.mis[i])); in dce60_resource_destruct()
[all …]
/linux-6.14.4/drivers/net/ethernet/mellanox/mlx5/core/
Dirq_affinity.c8 static void cpu_put(struct mlx5_irq_pool *pool, int cpu) in cpu_put() argument
10 pool->irqs_per_cpu[cpu]--; in cpu_put()
13 static void cpu_get(struct mlx5_irq_pool *pool, int cpu) in cpu_get() argument
15 pool->irqs_per_cpu[cpu]++; in cpu_get()
19 static int cpu_get_least_loaded(struct mlx5_irq_pool *pool, in cpu_get_least_loaded() argument
27 if (!pool->irqs_per_cpu[cpu]) { in cpu_get_least_loaded()
33 if (pool->irqs_per_cpu[cpu] < pool->irqs_per_cpu[best_cpu]) in cpu_get_least_loaded()
38 mlx5_core_err(pool->dev, "NO online CPUs in req_mask (%*pbl)\n", in cpu_get_least_loaded()
42 pool->irqs_per_cpu[best_cpu]++; in cpu_get_least_loaded()
48 irq_pool_request_irq(struct mlx5_irq_pool *pool, struct irq_affinity_desc *af_desc) in irq_pool_request_irq() argument
[all …]
/linux-6.14.4/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_cnt.c24 spinlock_t counter_pool_lock; /* Protects counter pool allocations */
54 struct mlxsw_sp_counter_pool *pool = mlxsw_sp->counter_pool; in mlxsw_sp_counter_sub_pools_init() local
62 for (i = 0; i < pool->sub_pools_count; i++) { in mlxsw_sp_counter_sub_pools_init()
63 sub_pool = &pool->sub_pools[i]; in mlxsw_sp_counter_sub_pools_init()
89 sub_pool = &pool->sub_pools[i]; in mlxsw_sp_counter_sub_pools_init()
99 struct mlxsw_sp_counter_pool *pool = mlxsw_sp->counter_pool; in mlxsw_sp_counter_sub_pools_fini() local
104 for (i = 0; i < pool->sub_pools_count; i++) { in mlxsw_sp_counter_sub_pools_fini()
105 sub_pool = &pool->sub_pools[i]; in mlxsw_sp_counter_sub_pools_fini()
115 const struct mlxsw_sp_counter_pool *pool = priv; in mlxsw_sp_counter_pool_occ_get() local
117 return atomic_read(&pool->active_entries_count); in mlxsw_sp_counter_pool_occ_get()
[all …]

12345678910>>...67