Home
last modified time | relevance | path

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

/Linux-v6.6/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,
241 #define MAKE_LIST(cachep, listp, slab, nodeid) \ argument
244 list_splice(&get_node(cachep, nodeid)->slab, listp); \
247 #define MAKE_ALL_LISTS(cachep, ptr, nodeid) \ argument
249 MAKE_LIST((cachep), (&(ptr)->slabs_full), slabs_full, nodeid); \
250 MAKE_LIST((cachep), (&(ptr)->slabs_partial), slabs_partial, nodeid); \
[all …]
Dslab.h654 struct kmem_cache *cachep; in cache_from_obj() local
660 cachep = virt_to_cache(x); in cache_from_obj()
661 if (WARN(cachep && cachep != s, in cache_from_obj()
663 __func__, s->name, cachep->name)) in cache_from_obj()
664 print_tracking(cachep, x); in cache_from_obj()
665 return cachep; in cache_from_obj()
831 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count,
833 void cache_random_seq_destroy(struct kmem_cache *cachep);
835 static inline int cache_random_seq_create(struct kmem_cache *cachep, in cache_random_seq_create() argument
840 static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } in cache_random_seq_destroy() argument
Dslab_common.c517 int kmem_cache_shrink(struct kmem_cache *cachep) in kmem_cache_shrink() argument
519 kasan_cache_shrink(cachep); in kmem_cache_shrink()
521 return __kmem_cache_shrink(cachep); in kmem_cache_shrink()
1221 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count, in cache_random_seq_create() argument
1225 if (count < 2 || cachep->random_seq) in cache_random_seq_create()
1228 cachep->random_seq = kcalloc(count, sizeof(unsigned int), gfp); in cache_random_seq_create()
1229 if (!cachep->random_seq) in cache_random_seq_create()
1232 freelist_randomize(cachep->random_seq, count); in cache_random_seq_create()
1237 void cache_random_seq_destroy(struct kmem_cache *cachep) in cache_random_seq_destroy() argument
1239 kfree(cachep->random_seq); in cache_random_seq_destroy()
[all …]
/Linux-v6.6/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-v6.6/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-v6.6/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-v6.6/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-v6.6/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-v6.6/net/ipv4/
Dinet_hashtables.c65 struct inet_bind_bucket *inet_bind_bucket_create(struct kmem_cache *cachep, in inet_bind_bucket_create() argument
71 struct inet_bind_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC); in inet_bind_bucket_create()
88 void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket *tb) in inet_bind_bucket_destroy() argument
92 kmem_cache_free(cachep, tb); in inet_bind_bucket_destroy()
124 struct inet_bind2_bucket *inet_bind2_bucket_create(struct kmem_cache *cachep, in inet_bind2_bucket_create() argument
131 struct inet_bind2_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC); in inet_bind2_bucket_create()
140 void inet_bind2_bucket_destroy(struct kmem_cache *cachep, struct inet_bind2_bucket *tb) in inet_bind2_bucket_destroy() argument
144 kmem_cache_free(cachep, tb); in inet_bind2_bucket_destroy()
/Linux-v6.6/Documentation/RCU/
Drculist_nulls.rst133 kmem_cache_free(cachep, obj);
207 obj = kmem_cache_alloc(cachep);
/Linux-v6.6/fs/ext4/
Dmballoc.c3242 struct kmem_cache *cachep = ext4_groupinfo_caches[cache_index]; in get_groupinfo_cache() local
3244 BUG_ON(!cachep); in get_groupinfo_cache()
3245 return cachep; in get_groupinfo_cache()
3293 struct kmem_cache *cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_add_groupinfo() local
3317 meta_group_info[i] = kmem_cache_zalloc(cachep, GFP_NOFS); in ext4_mb_add_groupinfo()
3372 struct kmem_cache *cachep; in ext4_mb_init_backend() local
3431 cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_init_backend()
3436 kmem_cache_free(cachep, grp); in ext4_mb_init_backend()
3468 struct kmem_cache *cachep; in ext4_groupinfo_create_slab() local
3485 cachep = kmem_cache_create(ext4_groupinfo_slab_names[cache_index], in ext4_groupinfo_create_slab()
[all …]
/Linux-v6.6/include/linux/
Dslab.h499 void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) __assume_slab_alignment __malloc;
/Linux-v6.6/fs/f2fs/
Df2fs.h2789 static inline void *f2fs_kmem_cache_alloc_nofail(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc_nofail() argument
2794 entry = kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc_nofail()
2796 entry = kmem_cache_alloc(cachep, flags | __GFP_NOFAIL); in f2fs_kmem_cache_alloc_nofail()
2800 static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc() argument
2804 return f2fs_kmem_cache_alloc_nofail(cachep, flags); in f2fs_kmem_cache_alloc()
2809 return kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc()