Home
last modified time | relevance | path

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

/linux/tools/testing/radix-tree/
H A Dlinux.c38 return cachep->size * cachep->nr_allocated; in kmem_cache_get_alloc()
65 cachep->non_kernel--; in kmem_cache_alloc_lru()
69 if (cachep->nr_objs) { in kmem_cache_alloc_lru()
71 cachep->nr_objs--; in kmem_cache_alloc_lru()
78 if (cachep->align) in kmem_cache_alloc_lru()
79 posix_memalign(&p, cachep->align, cachep->size); in kmem_cache_alloc_lru()
82 if (cachep->ctor) in kmem_cache_alloc_lru()
83 cachep->ctor(p); in kmem_cache_alloc_lru()
99 if (cachep->nr_objs > 10 || cachep->align) { in __kmem_cache_free_locked()
104 cachep->nr_objs++; in __kmem_cache_free_locked()
[all …]
/linux/tools/include/linux/
H A Dslab.h32 void *kmem_cache_alloc_lru(struct kmem_cache *cachep, struct list_lru *, int flags);
33 static inline void *kmem_cache_alloc(struct kmem_cache *cachep, int flags) in kmem_cache_alloc() argument
35 return kmem_cache_alloc_lru(cachep, NULL, flags); in kmem_cache_alloc()
37 void kmem_cache_free(struct kmem_cache *cachep, void *objp);
43 void kmem_cache_free_bulk(struct kmem_cache *cachep, size_t size, void **list);
44 int kmem_cache_alloc_bulk(struct kmem_cache *cachep, gfp_t gfp, size_t size,
/linux/drivers/scsi/snic/
H A 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/mm/
H A Dslab_common.c516 int kmem_cache_shrink(struct kmem_cache *cachep) in kmem_cache_shrink() argument
518 kasan_cache_shrink(cachep); in kmem_cache_shrink()
520 return __kmem_cache_shrink(cachep); in kmem_cache_shrink()
1004 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count, in cache_random_seq_create() argument
1008 if (count < 2 || cachep->random_seq) in cache_random_seq_create()
1011 cachep->random_seq = kcalloc(count, sizeof(unsigned int), gfp); in cache_random_seq_create()
1012 if (!cachep->random_seq) in cache_random_seq_create()
1015 freelist_randomize(cachep->random_seq, count); in cache_random_seq_create()
1020 void cache_random_seq_destroy(struct kmem_cache *cachep) in cache_random_seq_destroy() argument
1022 kfree(cachep->random_seq); in cache_random_seq_destroy()
[all …]
H A Dslab.h621 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count,
623 void cache_random_seq_destroy(struct kmem_cache *cachep);
625 static inline int cache_random_seq_create(struct kmem_cache *cachep, in cache_random_seq_create() argument
630 static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } in cache_random_seq_destroy() argument
H A Dslub.c4484 struct kmem_cache *cachep; in cache_from_obj() local
4490 cachep = virt_to_cache(x); in cache_from_obj()
4491 if (WARN(cachep && cachep != s, in cache_from_obj()
4493 __func__, s->name, cachep->name)) in cache_from_obj()
4494 print_tracking(cachep, x); in cache_from_obj()
4495 return cachep; in cache_from_obj()
/linux/arch/powerpc/mm/
H A 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/include/net/
H A Dinet_hashtables.h226 inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net,
229 void inet_bind_bucket_destroy(struct kmem_cache *cachep,
237 inet_bind2_bucket_create(struct kmem_cache *cachep, struct net *net,
242 void inet_bind2_bucket_destroy(struct kmem_cache *cachep,
/linux/net/ipv4/
H A 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()
128 struct inet_bind2_bucket *inet_bind2_bucket_create(struct kmem_cache *cachep, in inet_bind2_bucket_create() argument
134 struct inet_bind2_bucket *tb2 = kmem_cache_alloc(cachep, GFP_ATOMIC); in inet_bind2_bucket_create()
143 void inet_bind2_bucket_destroy(struct kmem_cache *cachep, struct inet_bind2_bucket *tb) in inet_bind2_bucket_destroy() argument
148 kmem_cache_free(cachep, tb); in inet_bind2_bucket_destroy()
/linux/Documentation/RCU/
H A Drculist_nulls.rst133 kmem_cache_free(cachep, obj);
207 obj = kmem_cache_alloc(cachep);
/linux/fs/ext4/
H A Dmballoc.c3280 struct kmem_cache *cachep = ext4_groupinfo_caches[cache_index]; in get_groupinfo_cache() local
3282 BUG_ON(!cachep); in get_groupinfo_cache()
3283 return cachep; in get_groupinfo_cache()
3355 meta_group_info[i] = kmem_cache_zalloc(cachep, GFP_NOFS); in ext4_mb_add_groupinfo()
3410 struct kmem_cache *cachep; in ext4_mb_init_backend() local
3470 cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_init_backend()
3475 kmem_cache_free(cachep, grp); in ext4_mb_init_backend()
3507 struct kmem_cache *cachep; in ext4_groupinfo_create_slab() local
3528 ext4_groupinfo_caches[cache_index] = cachep; in ext4_groupinfo_create_slab()
3531 if (!cachep) { in ext4_groupinfo_create_slab()
[all …]
/linux/include/linux/
H A Dslab.h544 void *kmem_cache_alloc_noprof(struct kmem_cache *cachep,
/linux/fs/f2fs/
H A Df2fs.h2810 static inline void *f2fs_kmem_cache_alloc_nofail(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc_nofail() argument
2815 entry = kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc_nofail()
2817 entry = kmem_cache_alloc(cachep, flags | __GFP_NOFAIL); in f2fs_kmem_cache_alloc_nofail()
2821 static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc() argument
2825 return f2fs_kmem_cache_alloc_nofail(cachep, flags); in f2fs_kmem_cache_alloc()
2830 return kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc()