Home
last modified time | relevance | path

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

/Linux-v5.4/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.h506 struct kmem_cache *cachep; in cache_from_obj() local
520 cachep = virt_to_cache(x); in cache_from_obj()
521 WARN_ONCE(cachep && !slab_equal_or_root(cachep, s), in cache_from_obj()
523 __func__, s->name, cachep->name); in cache_from_obj()
524 return cachep; in cache_from_obj()
662 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count,
664 void cache_random_seq_destroy(struct kmem_cache *cachep);
666 static inline int cache_random_seq_create(struct kmem_cache *cachep, in cache_random_seq_create() argument
671 static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } in cache_random_seq_destroy() argument
Dslab_common.c971 int kmem_cache_shrink(struct kmem_cache *cachep) in kmem_cache_shrink() argument
977 kasan_cache_shrink(cachep); in kmem_cache_shrink()
978 ret = __kmem_cache_shrink(cachep); in kmem_cache_shrink()
1347 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count, in cache_random_seq_create() argument
1352 if (count < 2 || cachep->random_seq) in cache_random_seq_create()
1355 cachep->random_seq = kcalloc(count, sizeof(unsigned int), gfp); in cache_random_seq_create()
1356 if (!cachep->random_seq) in cache_random_seq_create()
1362 freelist_randomize(&state, cachep->random_seq, count); in cache_random_seq_create()
1367 void cache_random_seq_destroy(struct kmem_cache *cachep) in cache_random_seq_destroy() argument
1369 kfree(cachep->random_seq); in cache_random_seq_destroy()
[all …]
Dslob.c622 void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) in kmem_cache_alloc() argument
624 return slob_alloc_node(cachep, flags, NUMA_NO_NODE); in kmem_cache_alloc()
635 void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t gfp, int node) in kmem_cache_alloc_node() argument
637 return slob_alloc_node(cachep, gfp, node); in kmem_cache_alloc_node()
Dmemcontrol.c2803 struct kmem_cache *cachep; member
2812 struct kmem_cache *cachep = cw->cachep; in memcg_kmem_cache_create_func() local
2814 memcg_create_kmem_cache(memcg, cachep); in memcg_kmem_cache_create_func()
2824 struct kmem_cache *cachep) in memcg_schedule_kmem_cache_create() argument
2836 cw->cachep = cachep; in memcg_schedule_kmem_cache_create()
2865 struct kmem_cache *memcg_kmem_get_cache(struct kmem_cache *cachep) in memcg_kmem_get_cache() argument
2872 VM_BUG_ON(!is_root_cache(cachep)); in memcg_kmem_get_cache()
2875 return cachep; in memcg_kmem_get_cache()
2891 arr = rcu_dereference(cachep->memcg_params.memcg_caches); in memcg_kmem_get_cache()
2920 memcg_schedule_kmem_cache_create(memcg, cachep); in memcg_kmem_get_cache()
[all …]
/Linux-v5.4/tools/testing/radix-tree/
Dlinux.c28 void *kmem_cache_alloc(struct kmem_cache *cachep, int flags) in kmem_cache_alloc() argument
35 pthread_mutex_lock(&cachep->lock); in kmem_cache_alloc()
36 if (cachep->nr_objs) { in kmem_cache_alloc()
37 cachep->nr_objs--; in kmem_cache_alloc()
38 node = cachep->objs; in kmem_cache_alloc()
39 cachep->objs = node->parent; in kmem_cache_alloc()
40 pthread_mutex_unlock(&cachep->lock); in kmem_cache_alloc()
43 pthread_mutex_unlock(&cachep->lock); in kmem_cache_alloc()
44 node = malloc(cachep->size); in kmem_cache_alloc()
45 if (cachep->ctor) in kmem_cache_alloc()
[all …]
/Linux-v5.4/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.4/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.4/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(PTE_INDEX_SIZE); in __hugepte_alloc()
60 cachep = PGT_CACHE(pdshift - pshift); in __hugepte_alloc()
64 if (!cachep) { in __hugepte_alloc()
69 new = kmem_cache_alloc(cachep, pgtable_gfp_flags(mm, GFP_KERNEL)); in __hugepte_alloc()
100 kmem_cache_free(cachep, new); in __hugepte_alloc()
/Linux-v5.4/include/net/
Dinet_hashtables.h200 inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net,
203 void inet_bind_bucket_destroy(struct kmem_cache *cachep,
/Linux-v5.4/net/ipv4/
Dinet_hashtables.c61 struct inet_bind_bucket *inet_bind_bucket_create(struct kmem_cache *cachep, in inet_bind_bucket_create() argument
67 struct inet_bind_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC); in inet_bind_bucket_create()
84 void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket *tb) in inet_bind_bucket_destroy() argument
88 kmem_cache_free(cachep, tb); in inet_bind_bucket_destroy()
/Linux-v5.4/Documentation/RCU/
Drculist_nulls.txt106 kmem_cache_free(cachep, obj);
160 obj = kmem_cache_alloc(cachep);
/Linux-v5.4/fs/gfs2/
Dglock.c801 struct kmem_cache *cachep; in gfs2_glock_get() local
813 cachep = gfs2_glock_aspace_cachep; in gfs2_glock_get()
815 cachep = gfs2_glock_cachep; in gfs2_glock_get()
816 gl = kmem_cache_alloc(cachep, GFP_NOFS); in gfs2_glock_get()
825 kmem_cache_free(cachep, gl); in gfs2_glock_get()
875 kmem_cache_free(cachep, gl); in gfs2_glock_get()
/Linux-v5.4/fs/ext4/
Dmballoc.c2345 struct kmem_cache *cachep = ext4_groupinfo_caches[cache_index]; in get_groupinfo_cache() local
2347 BUG_ON(!cachep); in get_groupinfo_cache()
2348 return cachep; in get_groupinfo_cache()
2392 struct kmem_cache *cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_add_groupinfo() local
2416 meta_group_info[i] = kmem_cache_zalloc(cachep, GFP_NOFS); in ext4_mb_add_groupinfo()
2475 struct kmem_cache *cachep; in ext4_mb_init_backend() local
2506 cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_init_backend()
2508 kmem_cache_free(cachep, ext4_get_group_info(sb, i)); in ext4_mb_init_backend()
2534 struct kmem_cache *cachep; in ext4_groupinfo_create_slab() local
2551 cachep = kmem_cache_create(ext4_groupinfo_slab_names[cache_index], in ext4_groupinfo_create_slab()
[all …]
/Linux-v5.4/include/linux/
Dmemcontrol.h1366 struct kmem_cache *memcg_kmem_get_cache(struct kmem_cache *cachep);
1367 void memcg_kmem_put_cache(struct kmem_cache *cachep);
/Linux-v5.4/fs/f2fs/
Df2fs.h2202 static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc() argument
2207 entry = kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc()
2209 entry = kmem_cache_alloc(cachep, flags | __GFP_NOFAIL); in f2fs_kmem_cache_alloc()