Lines Matching refs:kmem_cache
117 static inline int kmem_cache_debug(struct kmem_cache *s) in kmem_cache_debug()
126 static inline void *fixup_red_left(struct kmem_cache *s, void *p) in fixup_red_left()
134 static inline bool kmem_cache_has_cpu_partial(struct kmem_cache *s) in kmem_cache_has_cpu_partial()
209 static int sysfs_slab_add(struct kmem_cache *);
210 static int sysfs_slab_alias(struct kmem_cache *, const char *);
211 static void memcg_propagate_slab_attrs(struct kmem_cache *s);
213 static inline int sysfs_slab_add(struct kmem_cache *s) { return 0; } in sysfs_slab_add()
214 static inline int sysfs_slab_alias(struct kmem_cache *s, const char *p) in sysfs_slab_alias()
216 static inline void memcg_propagate_slab_attrs(struct kmem_cache *s) { } in memcg_propagate_slab_attrs()
219 static inline void stat(const struct kmem_cache *s, enum stat_item si) in stat()
234 static inline void *get_freepointer(struct kmem_cache *s, void *object) in get_freepointer()
239 static void prefetch_freepointer(const struct kmem_cache *s, void *object) in prefetch_freepointer()
244 static inline void *get_freepointer_safe(struct kmem_cache *s, void *object) in get_freepointer_safe()
256 static inline void set_freepointer(struct kmem_cache *s, void *object, void *fp) in set_freepointer()
273 static inline int slab_index(void *p, struct kmem_cache *s, void *addr) in slab_index()
278 static inline size_t slab_ksize(const struct kmem_cache *s) in slab_ksize()
356 static inline bool __cmpxchg_double_slab(struct kmem_cache *s, struct page *page, in __cmpxchg_double_slab()
393 static inline bool cmpxchg_double_slab(struct kmem_cache *s, struct page *page, in cmpxchg_double_slab()
441 static void get_map(struct kmem_cache *s, struct page *page, unsigned long *map) in get_map()
450 static inline int size_from_object(struct kmem_cache *s) in size_from_object()
458 static inline void *restore_red_left(struct kmem_cache *s, void *p) in restore_red_left()
483 static inline int check_valid_pointer(struct kmem_cache *s, in check_valid_pointer()
507 static struct track *get_track(struct kmem_cache *s, void *object, in get_track()
520 static void set_track(struct kmem_cache *s, void *object, in set_track()
552 static void init_tracking(struct kmem_cache *s, void *object) in init_tracking()
580 static void print_tracking(struct kmem_cache *s, void *object) in print_tracking()
596 static void slab_bug(struct kmem_cache *s, char *fmt, ...) in slab_bug()
612 static void slab_fix(struct kmem_cache *s, char *fmt, ...) in slab_fix()
624 static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p) in print_trailer()
662 static void object_err(struct kmem_cache *s, struct page *page, in object_err()
669 static void slab_err(struct kmem_cache *s, struct page *page, in slab_err()
683 static void init_object(struct kmem_cache *s, void *object, u8 val) in init_object()
699 static void restore_bytes(struct kmem_cache *s, char *message, u8 data, in restore_bytes()
706 static int check_bytes_and_report(struct kmem_cache *s, struct page *page, in check_bytes_and_report()
768 static int check_pad_bytes(struct kmem_cache *s, struct page *page, u8 *p) in check_pad_bytes()
788 static int slab_pad_check(struct kmem_cache *s, struct page *page) in slab_pad_check()
819 static int check_object(struct kmem_cache *s, struct page *page, in check_object()
875 static int check_slab(struct kmem_cache *s, struct page *page) in check_slab()
906 static int on_freelist(struct kmem_cache *s, struct page *page, void *search) in on_freelist()
955 static void trace(struct kmem_cache *s, struct page *page, void *object, in trace()
976 static void add_full(struct kmem_cache *s, in add_full()
986 static void remove_full(struct kmem_cache *s, struct kmem_cache_node *n, struct page *page) in remove_full()
996 static inline unsigned long slabs_node(struct kmem_cache *s, int node) in slabs_node()
1008 static inline void inc_slabs_node(struct kmem_cache *s, int node, int objects) in inc_slabs_node()
1023 static inline void dec_slabs_node(struct kmem_cache *s, int node, int objects) in dec_slabs_node()
1032 static void setup_object_debug(struct kmem_cache *s, struct page *page, in setup_object_debug()
1042 static noinline int alloc_debug_processing(struct kmem_cache *s, in alloc_debug_processing()
1079 struct kmem_cache *s, struct page *page, void *object, in free_debug_processing()
1220 static inline void setup_object_debug(struct kmem_cache *s, in setup_object_debug()
1223 static inline int alloc_debug_processing(struct kmem_cache *s, in alloc_debug_processing()
1227 struct kmem_cache *s, struct page *page, void *object, in free_debug_processing()
1230 static inline int slab_pad_check(struct kmem_cache *s, struct page *page) in slab_pad_check()
1232 static inline int check_object(struct kmem_cache *s, struct page *page, in check_object()
1234 static inline void add_full(struct kmem_cache *s, struct kmem_cache_node *n, in add_full()
1236 static inline void remove_full(struct kmem_cache *s, struct kmem_cache_node *n, in remove_full()
1248 static inline unsigned long slabs_node(struct kmem_cache *s, int node) in slabs_node()
1252 static inline void inc_slabs_node(struct kmem_cache *s, int node, in inc_slabs_node()
1254 static inline void dec_slabs_node(struct kmem_cache *s, int node, in dec_slabs_node()
1273 static inline int slab_pre_alloc_hook(struct kmem_cache *s, gfp_t flags) in slab_pre_alloc_hook()
1282 static inline void slab_post_alloc_hook(struct kmem_cache *s, in slab_post_alloc_hook()
1290 static inline void slab_free_hook(struct kmem_cache *s, void *x) in slab_free_hook()
1316 static inline struct page *alloc_slab_page(struct kmem_cache *s, in alloc_slab_page()
1338 static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) in allocate_slab()
1401 static void setup_object(struct kmem_cache *s, struct page *page, in setup_object()
1409 static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node) in new_slab()
1451 static void __free_slab(struct kmem_cache *s, struct page *page) in __free_slab()
1497 static void free_slab(struct kmem_cache *s, struct page *page) in free_slab()
1520 static void discard_slab(struct kmem_cache *s, struct page *page) in discard_slab()
1566 static inline void *acquire_slab(struct kmem_cache *s, in acquire_slab()
1606 static void put_cpu_partial(struct kmem_cache *s, struct page *page, int drain);
1612 static void *get_partial_node(struct kmem_cache *s, struct kmem_cache_node *n, in get_partial_node()
1661 static void *get_any_partial(struct kmem_cache *s, gfp_t flags, in get_any_partial()
1725 static void *get_partial(struct kmem_cache *s, gfp_t flags, int node, in get_partial()
1779 const struct kmem_cache *s, unsigned long tid) in note_cmpxchg_failure()
1802 static void init_kmem_cache_cpus(struct kmem_cache *s) in init_kmem_cache_cpus()
1813 static void deactivate_slab(struct kmem_cache *s, struct page *page, in deactivate_slab()
1962 static void unfreeze_partials(struct kmem_cache *s, in unfreeze_partials()
2032 static void put_cpu_partial(struct kmem_cache *s, struct page *page, int drain) in put_cpu_partial()
2075 static inline void flush_slab(struct kmem_cache *s, struct kmem_cache_cpu *c) in flush_slab()
2090 static inline void __flush_cpu_slab(struct kmem_cache *s, int cpu) in __flush_cpu_slab()
2104 struct kmem_cache *s = d; in flush_cpu_slab()
2111 struct kmem_cache *s = info; in has_cpu_slab()
2117 static void flush_all(struct kmem_cache *s) in flush_all()
2164 slab_out_of_memory(struct kmem_cache *s, gfp_t gfpflags, int nid) in slab_out_of_memory()
2200 static inline void *new_slab_objects(struct kmem_cache *s, gfp_t flags, in new_slab_objects()
2252 static inline void *get_freelist(struct kmem_cache *s, struct page *page) in get_freelist()
2292 static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, in __slab_alloc()
2412 static __always_inline void *slab_alloc_node(struct kmem_cache *s, in slab_alloc_node()
2490 static __always_inline void *slab_alloc(struct kmem_cache *s, in slab_alloc()
2496 void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags) in kmem_cache_alloc()
2508 void *kmem_cache_alloc_trace(struct kmem_cache *s, gfp_t gfpflags, size_t size) in kmem_cache_alloc_trace()
2518 void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t gfpflags, int node) in kmem_cache_alloc_node()
2530 void *kmem_cache_alloc_node_trace(struct kmem_cache *s, in kmem_cache_alloc_node_trace()
2552 static void __slab_free(struct kmem_cache *s, struct page *page, in __slab_free()
2676 static __always_inline void slab_free(struct kmem_cache *s, in slab_free()
2715 void kmem_cache_free(struct kmem_cache *s, void *x) in kmem_cache_free()
2865 static inline int alloc_kmem_cache_cpus(struct kmem_cache *s) in alloc_kmem_cache_cpus()
2885 static struct kmem_cache *kmem_cache_node;
2931 static void free_kmem_cache_nodes(struct kmem_cache *s) in free_kmem_cache_nodes()
2942 static int init_kmem_cache_nodes(struct kmem_cache *s) in init_kmem_cache_nodes()
2967 static void set_min_partial(struct kmem_cache *s, unsigned long min) in set_min_partial()
2980 static int calculate_sizes(struct kmem_cache *s, int forced_order) in calculate_sizes()
3095 static int kmem_cache_open(struct kmem_cache *s, unsigned long flags) in kmem_cache_open()
3178 static void list_slab_objects(struct kmem_cache *s, struct page *page, in list_slab_objects()
3209 static void free_partial(struct kmem_cache *s, struct kmem_cache_node *n) in free_partial()
3227 static inline int kmem_cache_close(struct kmem_cache *s) in kmem_cache_close()
3244 int __kmem_cache_shutdown(struct kmem_cache *s) in __kmem_cache_shutdown()
3283 struct kmem_cache *s; in __kmalloc()
3319 struct kmem_cache *s; in __kmalloc_node()
3356 struct kmem_cache *s; in __check_heap_object()
3435 int __kmem_cache_shrink(struct kmem_cache *s) in __kmem_cache_shrink()
3492 struct kmem_cache *s; in slab_mem_going_offline_callback()
3505 struct kmem_cache *s; in slab_mem_offline_callback()
3540 struct kmem_cache *s; in slab_mem_going_online_callback()
3619 static struct kmem_cache * __init bootstrap(struct kmem_cache *static_cache) in bootstrap()
3622 struct kmem_cache *s = kmem_cache_zalloc(kmem_cache, GFP_NOWAIT); in bootstrap()
3625 memcpy(s, static_cache, kmem_cache->object_size); in bootstrap()
3650 static __initdata struct kmem_cache boot_kmem_cache, in kmem_cache_init()
3657 kmem_cache = &boot_kmem_cache; in kmem_cache_init()
3667 create_boot_cache(kmem_cache, "kmem_cache", in kmem_cache_init()
3668 offsetof(struct kmem_cache, node) + in kmem_cache_init()
3672 kmem_cache = bootstrap(&boot_kmem_cache); in kmem_cache_init()
3698 struct kmem_cache *
3702 struct kmem_cache *s; in __kmem_cache_alias()
3707 struct kmem_cache *c; in __kmem_cache_alias()
3736 int __kmem_cache_create(struct kmem_cache *s, unsigned long flags) in __kmem_cache_create()
3765 struct kmem_cache *s; in slab_cpuup_callback()
3795 struct kmem_cache *s; in __kmalloc_track_caller()
3818 struct kmem_cache *s; in __kmalloc_node_track_caller()
3858 static int validate_slab(struct kmem_cache *s, struct page *page, in validate_slab()
3885 static void validate_slab_slab(struct kmem_cache *s, struct page *page, in validate_slab_slab()
3893 static int validate_slab_node(struct kmem_cache *s, in validate_slab_node()
3926 static long validate_slab_cache(struct kmem_cache *s) in validate_slab_cache()
3993 static int add_location(struct loc_track *t, struct kmem_cache *s, in add_location()
4069 static void process_slab(struct loc_track *t, struct kmem_cache *s, in process_slab()
4084 static int list_locations(struct kmem_cache *s, char *buf, in list_locations()
4248 static ssize_t show_slab_objects(struct kmem_cache *s, in show_slab_objects()
4346 static int any_slab_objects(struct kmem_cache *s) in any_slab_objects()
4360 #define to_slab(n) container_of(n, struct kmem_cache, kobj)
4364 ssize_t (*show)(struct kmem_cache *s, char *buf);
4365 ssize_t (*store)(struct kmem_cache *s, const char *x, size_t count);
4376 static ssize_t slab_size_show(struct kmem_cache *s, char *buf) in slab_size_show()
4382 static ssize_t align_show(struct kmem_cache *s, char *buf) in align_show()
4388 static ssize_t object_size_show(struct kmem_cache *s, char *buf) in object_size_show()
4394 static ssize_t objs_per_slab_show(struct kmem_cache *s, char *buf) in objs_per_slab_show()
4400 static ssize_t order_store(struct kmem_cache *s, in order_store()
4417 static ssize_t order_show(struct kmem_cache *s, char *buf) in order_show()
4423 static ssize_t min_partial_show(struct kmem_cache *s, char *buf) in min_partial_show()
4428 static ssize_t min_partial_store(struct kmem_cache *s, const char *buf, in min_partial_store()
4443 static ssize_t cpu_partial_show(struct kmem_cache *s, char *buf) in cpu_partial_show()
4448 static ssize_t cpu_partial_store(struct kmem_cache *s, const char *buf, in cpu_partial_store()
4466 static ssize_t ctor_show(struct kmem_cache *s, char *buf) in ctor_show()
4474 static ssize_t aliases_show(struct kmem_cache *s, char *buf) in aliases_show()
4480 static ssize_t partial_show(struct kmem_cache *s, char *buf) in partial_show()
4486 static ssize_t cpu_slabs_show(struct kmem_cache *s, char *buf) in cpu_slabs_show()
4492 static ssize_t objects_show(struct kmem_cache *s, char *buf) in objects_show()
4498 static ssize_t objects_partial_show(struct kmem_cache *s, char *buf) in objects_partial_show()
4504 static ssize_t slabs_cpu_partial_show(struct kmem_cache *s, char *buf) in slabs_cpu_partial_show()
4535 static ssize_t reclaim_account_show(struct kmem_cache *s, char *buf) in reclaim_account_show()
4540 static ssize_t reclaim_account_store(struct kmem_cache *s, in reclaim_account_store()
4550 static ssize_t hwcache_align_show(struct kmem_cache *s, char *buf) in hwcache_align_show()
4557 static ssize_t cache_dma_show(struct kmem_cache *s, char *buf) in cache_dma_show()
4564 static ssize_t destroy_by_rcu_show(struct kmem_cache *s, char *buf) in destroy_by_rcu_show()
4570 static ssize_t reserved_show(struct kmem_cache *s, char *buf) in reserved_show()
4577 static ssize_t slabs_show(struct kmem_cache *s, char *buf) in slabs_show()
4583 static ssize_t total_objects_show(struct kmem_cache *s, char *buf) in total_objects_show()
4589 static ssize_t sanity_checks_show(struct kmem_cache *s, char *buf) in sanity_checks_show()
4594 static ssize_t sanity_checks_store(struct kmem_cache *s, in sanity_checks_store()
4606 static ssize_t trace_show(struct kmem_cache *s, char *buf) in trace_show()
4611 static ssize_t trace_store(struct kmem_cache *s, const char *buf, in trace_store()
4631 static ssize_t red_zone_show(struct kmem_cache *s, char *buf) in red_zone_show()
4636 static ssize_t red_zone_store(struct kmem_cache *s, in red_zone_store()
4652 static ssize_t poison_show(struct kmem_cache *s, char *buf) in poison_show()
4657 static ssize_t poison_store(struct kmem_cache *s, in poison_store()
4673 static ssize_t store_user_show(struct kmem_cache *s, char *buf) in store_user_show()
4678 static ssize_t store_user_store(struct kmem_cache *s, in store_user_store()
4694 static ssize_t validate_show(struct kmem_cache *s, char *buf) in validate_show()
4699 static ssize_t validate_store(struct kmem_cache *s, in validate_store()
4713 static ssize_t alloc_calls_show(struct kmem_cache *s, char *buf) in alloc_calls_show()
4721 static ssize_t free_calls_show(struct kmem_cache *s, char *buf) in free_calls_show()
4731 static ssize_t failslab_show(struct kmem_cache *s, char *buf) in failslab_show()
4736 static ssize_t failslab_store(struct kmem_cache *s, const char *buf, in failslab_store()
4750 static ssize_t shrink_show(struct kmem_cache *s, char *buf) in shrink_show()
4755 static ssize_t shrink_store(struct kmem_cache *s, in shrink_store()
4770 static ssize_t remote_node_defrag_ratio_show(struct kmem_cache *s, char *buf) in remote_node_defrag_ratio_show()
4775 static ssize_t remote_node_defrag_ratio_store(struct kmem_cache *s, in remote_node_defrag_ratio_store()
4794 static int show_stat(struct kmem_cache *s, char *buf, enum stat_item si) in show_stat()
4823 static void clear_stat(struct kmem_cache *s, enum stat_item si) in clear_stat()
4832 static ssize_t text##_show(struct kmem_cache *s, char *buf) \
4836 static ssize_t text##_store(struct kmem_cache *s, \
4956 struct kmem_cache *s; in slab_attr_show()
4975 struct kmem_cache *s; in slab_attr_store()
5011 struct kmem_cache *c = cache_from_memcg_idx(s, i); in slab_attr_store()
5021 static void memcg_propagate_slab_attrs(struct kmem_cache *s) in memcg_propagate_slab_attrs()
5026 struct kmem_cache *root_cache; in memcg_propagate_slab_attrs()
5109 static inline struct kset *cache_kset(struct kmem_cache *s) in cache_kset()
5124 static char *create_unique_id(struct kmem_cache *s) in create_unique_id()
5155 static int sysfs_slab_add(struct kmem_cache *s) in sysfs_slab_add()
5212 void sysfs_slab_remove(struct kmem_cache *s) in sysfs_slab_remove()
5234 struct kmem_cache *s;
5241 static int sysfs_slab_alias(struct kmem_cache *s, const char *name) in sysfs_slab_alias()
5266 struct kmem_cache *s; in slab_sysfs_init()
5310 void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo) in get_slabinfo()
5332 void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s) in slabinfo_show_stats()