Home
last modified time | relevance | path

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

/Linux-v4.19/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.h251 struct kmem_cache *cachep; in cache_from_memcg_idx() local
262 cachep = READ_ONCE(arr->entries[idx]); in cache_from_memcg_idx()
265 return cachep; in cache_from_memcg_idx()
358 struct kmem_cache *cachep; in cache_from_obj() local
373 cachep = page->slab_cache; in cache_from_obj()
374 if (slab_equal_or_root(cachep, s)) in cache_from_obj()
375 return cachep; in cache_from_obj()
378 __func__, s->name, cachep->name); in cache_from_obj()
519 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count,
521 void cache_random_seq_destroy(struct kmem_cache *cachep);
[all …]
Dslab_common.c916 int kmem_cache_shrink(struct kmem_cache *cachep) in kmem_cache_shrink() argument
922 kasan_cache_shrink(cachep); in kmem_cache_shrink()
923 ret = __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
1226 if (count < 2 || cachep->random_seq) in cache_random_seq_create()
1229 cachep->random_seq = kcalloc(count, sizeof(unsigned int), gfp); in cache_random_seq_create()
1230 if (!cachep->random_seq) in cache_random_seq_create()
1236 freelist_randomize(&state, cachep->random_seq, count); in cache_random_seq_create()
1241 void cache_random_seq_destroy(struct kmem_cache *cachep) in cache_random_seq_destroy() argument
1243 kfree(cachep->random_seq); in cache_random_seq_destroy()
[all …]
Dslob.c567 void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) in kmem_cache_alloc() argument
569 return slob_alloc_node(cachep, flags, NUMA_NO_NODE); in kmem_cache_alloc()
580 void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t gfp, int node) in kmem_cache_alloc_node() argument
582 return slob_alloc_node(cachep, gfp, node); in kmem_cache_alloc_node()
Dmemcontrol.c2443 struct kmem_cache *cachep; member
2452 struct kmem_cache *cachep = cw->cachep; in memcg_kmem_cache_create_func() local
2454 memcg_create_kmem_cache(memcg, cachep); in memcg_kmem_cache_create_func()
2464 struct kmem_cache *cachep) in __memcg_schedule_kmem_cache_create() argument
2475 cw->cachep = cachep; in __memcg_schedule_kmem_cache_create()
2482 struct kmem_cache *cachep) in memcg_schedule_kmem_cache_create() argument
2496 __memcg_schedule_kmem_cache_create(memcg, cachep); in memcg_schedule_kmem_cache_create()
2523 struct kmem_cache *memcg_kmem_get_cache(struct kmem_cache *cachep) in memcg_kmem_get_cache() argument
2529 VM_BUG_ON(!is_root_cache(cachep)); in memcg_kmem_get_cache()
2532 return cachep; in memcg_kmem_get_cache()
[all …]
/Linux-v4.19/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-v4.19/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-v4.19/drivers/scsi/snic/
Dsnic_main.c859 struct kmem_cache *cachep; in snic_global_data_init() local
897 cachep = kmem_cache_create("snic_req_dfltsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init()
899 if (!cachep) { in snic_global_data_init()
905 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL] = cachep; in snic_global_data_init()
910 cachep = kmem_cache_create("snic_req_maxsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init()
912 if (!cachep) { in snic_global_data_init()
918 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL] = cachep; in snic_global_data_init()
921 cachep = kmem_cache_create("snic_req_maxsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init()
923 if (!cachep) { in snic_global_data_init()
929 snic_glob->req_cache[SNIC_REQ_TM_CACHE] = cachep; in snic_global_data_init()
/Linux-v4.19/arch/powerpc/mm/
Dhugetlbpage.c58 struct kmem_cache *cachep; in __hugepte_alloc() local
64 cachep = hugepte_cache; in __hugepte_alloc()
67 cachep = PGT_CACHE(pdshift - pshift); in __hugepte_alloc()
71 new = kmem_cache_zalloc(cachep, pgtable_gfp_flags(mm, GFP_KERNEL)); in __hugepte_alloc()
114 kmem_cache_free(cachep, new); in __hugepte_alloc()
/Linux-v4.19/include/net/
Dinet_hashtables.h192 inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net,
195 void inet_bind_bucket_destroy(struct kmem_cache *cachep,
/Linux-v4.19/net/ipv4/
Dinet_hashtables.c65 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()
86 void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket *tb) in inet_bind_bucket_destroy() argument
90 kmem_cache_free(cachep, tb); in inet_bind_bucket_destroy()
/Linux-v4.19/Documentation/RCU/
Drculist_nulls.txt106 kmem_cache_free(cachep, obj);
160 obj = kmem_cache_alloc(cachep);
/Linux-v4.19/fs/gfs2/
Dglock.c793 struct kmem_cache *cachep; in gfs2_glock_get() local
805 cachep = gfs2_glock_aspace_cachep; in gfs2_glock_get()
807 cachep = gfs2_glock_cachep; in gfs2_glock_get()
808 gl = kmem_cache_alloc(cachep, GFP_NOFS); in gfs2_glock_get()
817 kmem_cache_free(cachep, gl); in gfs2_glock_get()
867 kmem_cache_free(cachep, gl); in gfs2_glock_get()
/Linux-v4.19/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
2505 cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_init_backend()
2507 kmem_cache_free(cachep, ext4_get_group_info(sb, i)); in ext4_mb_init_backend()
2533 struct kmem_cache *cachep; in ext4_groupinfo_create_slab() local
2550 cachep = kmem_cache_create(ext4_groupinfo_slab_names[cache_index], in ext4_groupinfo_create_slab()
[all …]
/Linux-v4.19/include/linux/
Dmemcontrol.h1267 struct kmem_cache *memcg_kmem_get_cache(struct kmem_cache *cachep);
1268 void memcg_kmem_put_cache(struct kmem_cache *cachep);
/Linux-v4.19/fs/f2fs/
Df2fs.h2062 static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc() argument
2067 entry = kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc()
2069 entry = kmem_cache_alloc(cachep, flags | __GFP_NOFAIL); in f2fs_kmem_cache_alloc()