Home
last modified time | relevance | path

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

/Linux-v5.10/mm/
Dslab.c211 static void free_block(struct kmem_cache *cachep, void **objpp, int len,
213 static void slabs_destroy(struct kmem_cache *cachep, struct list_head *list);
214 static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp);
217 static inline void fixup_objfreelist_debug(struct kmem_cache *cachep,
219 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.h463 struct kmem_cache *cachep; in cache_from_obj() local
469 cachep = virt_to_cache(x); in cache_from_obj()
470 if (WARN(cachep && cachep != s, in cache_from_obj()
472 __func__, s->name, cachep->name)) in cache_from_obj()
473 print_tracking(cachep, x); in cache_from_obj()
474 return cachep; in cache_from_obj()
609 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count,
611 void cache_random_seq_destroy(struct kmem_cache *cachep);
613 static inline int cache_random_seq_create(struct kmem_cache *cachep, in cache_random_seq_create() argument
618 static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } in cache_random_seq_destroy() argument
Dslab_common.c520 int kmem_cache_shrink(struct kmem_cache *cachep) in kmem_cache_shrink() argument
526 kasan_cache_shrink(cachep); in kmem_cache_shrink()
527 ret = __kmem_cache_shrink(cachep); in kmem_cache_shrink()
879 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count, in cache_random_seq_create() argument
884 if (count < 2 || cachep->random_seq) in cache_random_seq_create()
887 cachep->random_seq = kcalloc(count, sizeof(unsigned int), gfp); in cache_random_seq_create()
888 if (!cachep->random_seq) in cache_random_seq_create()
894 freelist_randomize(&state, cachep->random_seq, count); in cache_random_seq_create()
899 void cache_random_seq_destroy(struct kmem_cache *cachep) in cache_random_seq_destroy() argument
901 kfree(cachep->random_seq); in cache_random_seq_destroy()
[all …]
Dslob.c624 void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) in kmem_cache_alloc() argument
626 return slob_alloc_node(cachep, flags, NUMA_NO_NODE); in kmem_cache_alloc()
637 void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t gfp, int node) in kmem_cache_alloc_node() argument
639 return slob_alloc_node(cachep, gfp, node); in kmem_cache_alloc_node()
/Linux-v5.10/tools/testing/radix-tree/
Dlinux.c29 void *kmem_cache_alloc(struct kmem_cache *cachep, int gfp) in kmem_cache_alloc() argument
36 pthread_mutex_lock(&cachep->lock); in kmem_cache_alloc()
37 if (cachep->nr_objs) { in kmem_cache_alloc()
38 struct radix_tree_node *node = cachep->objs; in kmem_cache_alloc()
39 cachep->nr_objs--; in kmem_cache_alloc()
40 cachep->objs = node->parent; in kmem_cache_alloc()
41 pthread_mutex_unlock(&cachep->lock); in kmem_cache_alloc()
45 pthread_mutex_unlock(&cachep->lock); in kmem_cache_alloc()
46 if (cachep->align) in kmem_cache_alloc()
47 posix_memalign(&p, cachep->align, cachep->size); in kmem_cache_alloc()
[all …]
/Linux-v5.10/tools/testing/radix-tree/linux/
Dslab.h20 void *kmem_cache_alloc(struct kmem_cache *cachep, int flags);
21 void kmem_cache_free(struct kmem_cache *cachep, void *objp);
/Linux-v5.10/drivers/scsi/snic/
Dsnic_main.c833 struct kmem_cache *cachep; in snic_global_data_init() local
866 cachep = kmem_cache_create("snic_req_dfltsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init()
868 if (!cachep) { in snic_global_data_init()
874 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL] = cachep; in snic_global_data_init()
879 cachep = kmem_cache_create("snic_req_maxsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init()
881 if (!cachep) { in snic_global_data_init()
887 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL] = cachep; in snic_global_data_init()
890 cachep = kmem_cache_create("snic_req_maxsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init()
892 if (!cachep) { in snic_global_data_init()
898 snic_glob->req_cache[SNIC_REQ_TM_CACHE] = cachep; in snic_global_data_init()
/Linux-v5.10/arch/powerpc/mm/
Dhugetlbpage.c48 struct kmem_cache *cachep; in __hugepte_alloc() local
54 cachep = PGT_CACHE(PTE_T_ORDER); in __hugepte_alloc()
57 cachep = PGT_CACHE(pdshift - pshift); in __hugepte_alloc()
61 if (!cachep) { in __hugepte_alloc()
66 new = kmem_cache_alloc(cachep, pgtable_gfp_flags(mm, GFP_KERNEL)); in __hugepte_alloc()
97 kmem_cache_free(cachep, new); in __hugepte_alloc()
/Linux-v5.10/include/net/
Dinet_hashtables.h212 inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net,
215 void inet_bind_bucket_destroy(struct kmem_cache *cachep,
/Linux-v5.10/Documentation/RCU/
Drculist_nulls.rst125 kmem_cache_free(cachep, obj);
188 obj = kmem_cache_alloc(cachep);
/Linux-v5.10/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()
/Linux-v5.10/fs/gfs2/
Dglock.c1005 struct kmem_cache *cachep; in gfs2_glock_get() local
1017 cachep = gfs2_glock_aspace_cachep; in gfs2_glock_get()
1019 cachep = gfs2_glock_cachep; in gfs2_glock_get()
1020 gl = kmem_cache_alloc(cachep, GFP_NOFS); in gfs2_glock_get()
1029 kmem_cache_free(cachep, gl); in gfs2_glock_get()
1081 kmem_cache_free(cachep, gl); in gfs2_glock_get()
/Linux-v5.10/fs/ext4/
Dmballoc.c2579 struct kmem_cache *cachep = ext4_groupinfo_caches[cache_index]; in get_groupinfo_cache() local
2581 BUG_ON(!cachep); in get_groupinfo_cache()
2582 return cachep; in get_groupinfo_cache()
2630 struct kmem_cache *cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_add_groupinfo() local
2654 meta_group_info[i] = kmem_cache_zalloc(cachep, GFP_NOFS); in ext4_mb_add_groupinfo()
2706 struct kmem_cache *cachep; in ext4_mb_init_backend() local
2757 cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_init_backend()
2759 kmem_cache_free(cachep, ext4_get_group_info(sb, i)); in ext4_mb_init_backend()
2790 struct kmem_cache *cachep; in ext4_groupinfo_create_slab() local
2807 cachep = kmem_cache_create(ext4_groupinfo_slab_names[cache_index], in ext4_groupinfo_create_slab()
[all …]
/Linux-v5.10/fs/f2fs/
Df2fs.h2469 static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc() argument
2474 entry = kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc()
2476 entry = kmem_cache_alloc(cachep, flags | __GFP_NOFAIL); in f2fs_kmem_cache_alloc()