Home
last modified time | relevance | path

Searched refs:cachep (Results 1 – 13 of 13) sorted by relevance

/linux-6.1.9/mm/
Dslab.c212 static void free_block(struct kmem_cache *cachep, void **objpp, int len,
214 static void slabs_destroy(struct kmem_cache *cachep, struct list_head *list);
215 static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp);
218 static inline void fixup_objfreelist_debug(struct kmem_cache *cachep,
220 static inline void fixup_slab_list(struct kmem_cache *cachep,
242 #define MAKE_LIST(cachep, listp, slab, nodeid) \ argument
245 list_splice(&get_node(cachep, nodeid)->slab, listp); \
248 #define MAKE_ALL_LISTS(cachep, ptr, nodeid) \ argument
250 MAKE_LIST((cachep), (&(ptr)->slabs_full), slabs_full, nodeid); \
251 MAKE_LIST((cachep), (&(ptr)->slabs_partial), slabs_partial, nodeid); \
[all …]
Dslab.h653 struct kmem_cache *cachep; in cache_from_obj() local
659 cachep = virt_to_cache(x); in cache_from_obj()
660 if (WARN(cachep && cachep != s, in cache_from_obj()
662 __func__, s->name, cachep->name)) in cache_from_obj()
663 print_tracking(cachep, x); in cache_from_obj()
664 return cachep; in cache_from_obj()
808 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count,
810 void cache_random_seq_destroy(struct kmem_cache *cachep);
812 static inline int cache_random_seq_create(struct kmem_cache *cachep, in cache_random_seq_create() argument
817 static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } in cache_random_seq_destroy() argument
Dslab_common.c512 int kmem_cache_shrink(struct kmem_cache *cachep) in kmem_cache_shrink() argument
514 kasan_cache_shrink(cachep); in kmem_cache_shrink()
516 return __kmem_cache_shrink(cachep); in kmem_cache_shrink()
1151 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count, in cache_random_seq_create() argument
1156 if (count < 2 || cachep->random_seq) in cache_random_seq_create()
1159 cachep->random_seq = kcalloc(count, sizeof(unsigned int), gfp); in cache_random_seq_create()
1160 if (!cachep->random_seq) in cache_random_seq_create()
1166 freelist_randomize(&state, cachep->random_seq, count); in cache_random_seq_create()
1171 void cache_random_seq_destroy(struct kmem_cache *cachep) in cache_random_seq_destroy() argument
1173 kfree(cachep->random_seq); in cache_random_seq_destroy()
[all …]
Dslob.c640 void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) in kmem_cache_alloc() argument
642 return slob_alloc_node(cachep, flags, NUMA_NO_NODE); in kmem_cache_alloc()
647 void *kmem_cache_alloc_lru(struct kmem_cache *cachep, struct list_lru *lru, gfp_t flags) in kmem_cache_alloc_lru() argument
649 return slob_alloc_node(cachep, flags, NUMA_NO_NODE); in kmem_cache_alloc_lru()
659 void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t gfp, int node) in kmem_cache_alloc_node() argument
661 return slob_alloc_node(cachep, gfp, node); in kmem_cache_alloc_node()
/linux-6.1.9/tools/testing/radix-tree/
Dlinux.c31 void kmem_cache_set_non_kernel(struct kmem_cache *cachep, unsigned int val) in kmem_cache_set_non_kernel() argument
33 cachep->non_kernel = val; in kmem_cache_set_non_kernel()
36 unsigned long kmem_cache_get_alloc(struct kmem_cache *cachep) in kmem_cache_get_alloc() argument
38 return cachep->size * cachep->nr_allocated; in kmem_cache_get_alloc()
41 unsigned long kmem_cache_nr_allocated(struct kmem_cache *cachep) in kmem_cache_nr_allocated() argument
43 return cachep->nr_allocated; in kmem_cache_nr_allocated()
46 unsigned long kmem_cache_nr_tallocated(struct kmem_cache *cachep) in kmem_cache_nr_tallocated() argument
48 return cachep->nr_tallocated; in kmem_cache_nr_tallocated()
51 void kmem_cache_zero_nr_tallocated(struct kmem_cache *cachep) in kmem_cache_zero_nr_tallocated() argument
53 cachep->nr_tallocated = 0; in kmem_cache_zero_nr_tallocated()
[all …]
/linux-6.1.9/tools/include/linux/
Dslab.h33 void *kmem_cache_alloc_lru(struct kmem_cache *cachep, struct list_lru *, int flags);
34 static inline void *kmem_cache_alloc(struct kmem_cache *cachep, int flags) in kmem_cache_alloc() argument
36 return kmem_cache_alloc_lru(cachep, NULL, flags); in kmem_cache_alloc()
38 void kmem_cache_free(struct kmem_cache *cachep, void *objp);
44 void kmem_cache_free_bulk(struct kmem_cache *cachep, size_t size, void **list);
45 int kmem_cache_alloc_bulk(struct kmem_cache *cachep, gfp_t gfp, size_t size,
/linux-6.1.9/drivers/scsi/snic/
Dsnic_main.c819 struct kmem_cache *cachep; in snic_global_data_init() local
852 cachep = kmem_cache_create("snic_req_dfltsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init()
854 if (!cachep) { in snic_global_data_init()
860 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL] = cachep; in snic_global_data_init()
865 cachep = kmem_cache_create("snic_req_maxsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init()
867 if (!cachep) { in snic_global_data_init()
873 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL] = cachep; in snic_global_data_init()
876 cachep = kmem_cache_create("snic_req_maxsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init()
878 if (!cachep) { in snic_global_data_init()
884 snic_glob->req_cache[SNIC_REQ_TM_CACHE] = cachep; in snic_global_data_init()
/linux-6.1.9/arch/powerpc/mm/
Dhugetlbpage.c49 struct kmem_cache *cachep; in __hugepte_alloc() local
55 cachep = PGT_CACHE(PTE_T_ORDER); in __hugepte_alloc()
58 cachep = PGT_CACHE(pdshift - pshift); in __hugepte_alloc()
62 if (!cachep) { in __hugepte_alloc()
67 new = kmem_cache_alloc(cachep, pgtable_gfp_flags(mm, GFP_KERNEL)); in __hugepte_alloc()
98 kmem_cache_free(cachep, new); in __hugepte_alloc()
/linux-6.1.9/include/net/
Dinet_hashtables.h231 inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net,
234 void inet_bind_bucket_destroy(struct kmem_cache *cachep,
242 inet_bind2_bucket_create(struct kmem_cache *cachep, struct net *net,
247 void inet_bind2_bucket_destroy(struct kmem_cache *cachep,
/linux-6.1.9/net/ipv4/
Dinet_hashtables.c64 struct inet_bind_bucket *inet_bind_bucket_create(struct kmem_cache *cachep, in inet_bind_bucket_create() argument
70 struct inet_bind_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC); in inet_bind_bucket_create()
87 void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket *tb) in inet_bind_bucket_destroy() argument
91 kmem_cache_free(cachep, tb); in inet_bind_bucket_destroy()
123 struct inet_bind2_bucket *inet_bind2_bucket_create(struct kmem_cache *cachep, in inet_bind2_bucket_create() argument
130 struct inet_bind2_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC); in inet_bind2_bucket_create()
139 void inet_bind2_bucket_destroy(struct kmem_cache *cachep, struct inet_bind2_bucket *tb) in inet_bind2_bucket_destroy() argument
143 kmem_cache_free(cachep, tb); in inet_bind2_bucket_destroy()
/linux-6.1.9/Documentation/RCU/
Drculist_nulls.rst125 kmem_cache_free(cachep, obj);
188 obj = kmem_cache_alloc(cachep);
/linux-6.1.9/fs/ext4/
Dmballoc.c3022 struct kmem_cache *cachep = ext4_groupinfo_caches[cache_index]; in get_groupinfo_cache() local
3024 BUG_ON(!cachep); in get_groupinfo_cache()
3025 return cachep; in get_groupinfo_cache()
3073 struct kmem_cache *cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_add_groupinfo() local
3097 meta_group_info[i] = kmem_cache_zalloc(cachep, GFP_NOFS); in ext4_mb_add_groupinfo()
3153 struct kmem_cache *cachep; in ext4_mb_init_backend() local
3212 cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_init_backend()
3214 kmem_cache_free(cachep, ext4_get_group_info(sb, i)); in ext4_mb_init_backend()
3245 struct kmem_cache *cachep; in ext4_groupinfo_create_slab() local
3262 cachep = kmem_cache_create(ext4_groupinfo_slab_names[cache_index], in ext4_groupinfo_create_slab()
[all …]
/linux-6.1.9/fs/f2fs/
Df2fs.h2782 static inline void *f2fs_kmem_cache_alloc_nofail(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc_nofail() argument
2787 entry = kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc_nofail()
2789 entry = kmem_cache_alloc(cachep, flags | __GFP_NOFAIL); in f2fs_kmem_cache_alloc_nofail()
2793 static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc() argument
2797 return f2fs_kmem_cache_alloc_nofail(cachep, flags); in f2fs_kmem_cache_alloc()
2804 return kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc()