Home
last modified time | relevance | path

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

/kernel/linux/linux-5.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.h460 struct kmem_cache *cachep; in cache_from_obj() local
466 cachep = virt_to_cache(x); in cache_from_obj()
467 if (WARN(cachep && cachep != s, in cache_from_obj()
469 __func__, s->name, cachep->name)) in cache_from_obj()
470 print_tracking(cachep, x); in cache_from_obj()
471 return cachep; in cache_from_obj()
606 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count,
608 void cache_random_seq_destroy(struct kmem_cache *cachep);
610 static inline int cache_random_seq_create(struct kmem_cache *cachep, in cache_random_seq_create() argument
615 static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } in cache_random_seq_destroy() argument
Dslab_common.c519 int kmem_cache_shrink(struct kmem_cache *cachep) in kmem_cache_shrink() argument
525 kasan_cache_shrink(cachep); in kmem_cache_shrink()
526 ret = __kmem_cache_shrink(cachep); in kmem_cache_shrink()
878 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count, in cache_random_seq_create() argument
883 if (count < 2 || cachep->random_seq) in cache_random_seq_create()
886 cachep->random_seq = kcalloc(count, sizeof(unsigned int), gfp); in cache_random_seq_create()
887 if (!cachep->random_seq) in cache_random_seq_create()
893 freelist_randomize(&state, cachep->random_seq, count); in cache_random_seq_create()
898 void cache_random_seq_destroy(struct kmem_cache *cachep) in cache_random_seq_destroy() argument
900 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()
/kernel/linux/linux-5.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 …]
/kernel/linux/linux-5.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);
/kernel/linux/linux-5.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()
/kernel/linux/linux-5.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()
/kernel/linux/linux-5.10/include/net/
Dinet_hashtables.h215 inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net,
218 void inet_bind_bucket_destroy(struct kmem_cache *cachep,
/kernel/linux/linux-5.10/Documentation/RCU/
Drculist_nulls.rst125 kmem_cache_free(cachep, obj);
188 obj = kmem_cache_alloc(cachep);
/kernel/linux/linux-5.10/net/ipv4/
Dinet_hashtables.c76 struct inet_bind_bucket *inet_bind_bucket_create(struct kmem_cache *cachep, in inet_bind_bucket_create() argument
82 struct inet_bind_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC); in inet_bind_bucket_create()
99 void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket *tb) in inet_bind_bucket_destroy() argument
103 kmem_cache_free(cachep, tb); in inet_bind_bucket_destroy()
/kernel/linux/linux-5.10/fs/gfs2/
Dglock.c1023 struct kmem_cache *cachep; in gfs2_glock_get() local
1035 cachep = gfs2_glock_aspace_cachep; in gfs2_glock_get()
1037 cachep = gfs2_glock_cachep; in gfs2_glock_get()
1038 gl = kmem_cache_alloc(cachep, GFP_NOFS); in gfs2_glock_get()
1047 kmem_cache_free(cachep, gl); in gfs2_glock_get()
1099 kmem_cache_free(cachep, gl); in gfs2_glock_get()
/kernel/linux/linux-5.10/fs/ext4/
Dmballoc.c2580 struct kmem_cache *cachep = ext4_groupinfo_caches[cache_index]; in get_groupinfo_cache() local
2582 BUG_ON(!cachep); in get_groupinfo_cache()
2583 return cachep; in get_groupinfo_cache()
2631 struct kmem_cache *cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_add_groupinfo() local
2655 meta_group_info[i] = kmem_cache_zalloc(cachep, GFP_NOFS); in ext4_mb_add_groupinfo()
2707 struct kmem_cache *cachep; in ext4_mb_init_backend() local
2766 cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_init_backend()
2768 kmem_cache_free(cachep, ext4_get_group_info(sb, i)); in ext4_mb_init_backend()
2799 struct kmem_cache *cachep; in ext4_groupinfo_create_slab() local
2816 cachep = kmem_cache_create(ext4_groupinfo_slab_names[cache_index], in ext4_groupinfo_create_slab()
[all …]
/kernel/linux/linux-5.10/fs/f2fs/
Df2fs.h2447 static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc() argument
2452 entry = kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc()
2454 entry = kmem_cache_alloc(cachep, flags | __GFP_NOFAIL); in f2fs_kmem_cache_alloc()