| /linux-6.15/tools/testing/shared/ |
| H A D | linux.c | 51 return cachep->size * cachep->nr_allocated; in kmem_cache_get_alloc() 75 if (cachep->callback) in kmem_cache_alloc_lru() 76 cachep->callback(cachep->private); in kmem_cache_alloc_lru() 92 cachep->nr_objs--; in kmem_cache_alloc_lru() 99 if (cachep->align) { in kmem_cache_alloc_lru() 100 if (posix_memalign(&p, cachep->align, cachep->size) < 0) in kmem_cache_alloc_lru() 106 if (cachep->ctor) in kmem_cache_alloc_lru() 107 cachep->ctor(p); in kmem_cache_alloc_lru() 123 if (cachep->nr_objs > 10 || cachep->align) { in __kmem_cache_free_locked() 128 cachep->nr_objs++; in __kmem_cache_free_locked() [all …]
|
| /linux-6.15/tools/include/linux/ |
| H A D | slab.h | 33 void *kmem_cache_alloc_lru(struct kmem_cache *cachep, struct list_lru *, int flags); 34 static inline void *kmem_cache_alloc(struct kmem_cache *cachep, int flags) in kmem_cache_alloc() argument 36 return kmem_cache_alloc_lru(cachep, NULL, flags); in kmem_cache_alloc() 38 void kmem_cache_free(struct kmem_cache *cachep, void *objp); 44 void kmem_cache_free_bulk(struct kmem_cache *cachep, size_t size, void **list); 45 int kmem_cache_alloc_bulk(struct kmem_cache *cachep, gfp_t gfp, size_t size,
|
| /linux-6.15/drivers/scsi/snic/ |
| H A D | snic_main.c | 818 struct kmem_cache *cachep; in snic_global_data_init() local 851 cachep = kmem_cache_create("snic_req_dfltsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init() 853 if (!cachep) { in snic_global_data_init() 859 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL] = cachep; in snic_global_data_init() 864 cachep = kmem_cache_create("snic_req_maxsgl", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init() 866 if (!cachep) { in snic_global_data_init() 872 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL] = cachep; in snic_global_data_init() 875 cachep = kmem_cache_create("snic_req_tm", len, SNIC_SG_DESC_ALIGN, in snic_global_data_init() 877 if (!cachep) { in snic_global_data_init() 883 snic_glob->req_cache[SNIC_REQ_TM_CACHE] = cachep; in snic_global_data_init()
|
| /linux-6.15/mm/ |
| H A D | slab.h | 625 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count, 627 void cache_random_seq_destroy(struct kmem_cache *cachep); 629 static inline int cache_random_seq_create(struct kmem_cache *cachep, in cache_random_seq_create() argument 634 static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } in cache_random_seq_destroy() argument
|
| H A D | slab_common.c | 556 int kmem_cache_shrink(struct kmem_cache *cachep) in kmem_cache_shrink() argument 558 kasan_cache_shrink(cachep); in kmem_cache_shrink() 560 return __kmem_cache_shrink(cachep); in kmem_cache_shrink() 1047 int cache_random_seq_create(struct kmem_cache *cachep, unsigned int count, in cache_random_seq_create() argument 1051 if (count < 2 || cachep->random_seq) in cache_random_seq_create() 1054 cachep->random_seq = kcalloc(count, sizeof(unsigned int), gfp); in cache_random_seq_create() 1055 if (!cachep->random_seq) in cache_random_seq_create() 1058 freelist_randomize(cachep->random_seq, count); in cache_random_seq_create() 1063 void cache_random_seq_destroy(struct kmem_cache *cachep) in cache_random_seq_destroy() argument 1065 kfree(cachep->random_seq); in cache_random_seq_destroy() [all …]
|
| H A D | slub.c | 4716 struct kmem_cache *cachep; in cache_from_obj() local 4722 cachep = virt_to_cache(x); in cache_from_obj() 4723 if (WARN(cachep && cachep != s, in cache_from_obj() 4725 __func__, s->name, cachep->name)) in cache_from_obj() 4726 print_tracking(cachep, x); in cache_from_obj() 4727 return cachep; in cache_from_obj()
|
| /linux-6.15/include/net/ |
| H A D | inet_hashtables.h | 227 inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net, 237 inet_bind2_bucket_create(struct kmem_cache *cachep, struct net *net, 242 void inet_bind2_bucket_destroy(struct kmem_cache *cachep,
|
| /linux-6.15/net/ipv4/ |
| H A D | inet_hashtables.c | 64 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() 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-6.15/Documentation/RCU/ |
| H A D | rculist_nulls.rst | 133 kmem_cache_free(cachep, obj); 207 obj = kmem_cache_alloc(cachep);
|
| /linux-6.15/fs/ext4/ |
| H A D | mballoc.c | 3279 struct kmem_cache *cachep = ext4_groupinfo_caches[cache_index]; in get_groupinfo_cache() local 3281 BUG_ON(!cachep); in get_groupinfo_cache() 3282 return cachep; in get_groupinfo_cache() 3354 meta_group_info[i] = kmem_cache_zalloc(cachep, GFP_NOFS); in ext4_mb_add_groupinfo() 3409 struct kmem_cache *cachep; in ext4_mb_init_backend() local 3469 cachep = get_groupinfo_cache(sb->s_blocksize_bits); in ext4_mb_init_backend() 3474 kmem_cache_free(cachep, grp); in ext4_mb_init_backend() 3506 struct kmem_cache *cachep; in ext4_groupinfo_create_slab() local 3527 ext4_groupinfo_caches[cache_index] = cachep; in ext4_groupinfo_create_slab() 3530 if (!cachep) { in ext4_groupinfo_create_slab() [all …]
|
| /linux-6.15/include/linux/ |
| H A D | slab.h | 737 void *kmem_cache_alloc_noprof(struct kmem_cache *cachep,
|
| /linux-6.15/fs/f2fs/ |
| H A D | f2fs.h | 2907 static inline void *f2fs_kmem_cache_alloc_nofail(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc_nofail() argument 2912 entry = kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc_nofail() 2914 entry = kmem_cache_alloc(cachep, flags | __GFP_NOFAIL); in f2fs_kmem_cache_alloc_nofail() 2918 static inline void *f2fs_kmem_cache_alloc(struct kmem_cache *cachep, in f2fs_kmem_cache_alloc() argument 2922 return f2fs_kmem_cache_alloc_nofail(cachep, flags); in f2fs_kmem_cache_alloc() 2927 return kmem_cache_alloc(cachep, flags); in f2fs_kmem_cache_alloc()
|
| /linux-6.15/lib/ |
| H A D | maple_tree.c | 6953 extern void kmem_cache_set_callback(struct kmem_cache *cachep, 6960 extern void kmem_cache_set_private(struct kmem_cache *cachep, void *private);
|