Home
last modified time | relevance | path

Searched refs:slab (Results 1 – 25 of 62) sorted by relevance

123

/linux/mm/
H A Dslab.h116 struct slab { struct
137 static_assert(offsetof(struct page, pg) == offsetof(struct slab, sl)) argument
147 static_assert(sizeof(struct slab) <= sizeof(struct page));
149 static_assert(IS_ALIGNED(offsetof(struct slab, freelist), sizeof(struct freelist_counters)));
164 const struct slab *: (const struct folio *)s, \
165 struct slab *: (struct folio *)s))
174 static inline struct slab *page_slab(const struct page *page) in page_slab()
180 return (struct slab *)page; in page_slab()
193 static inline void *slab_address(const struct slab *slab) in slab_address() argument
195 return folio_address(slab_folio(slab)); in slab_address()
[all …]
H A Dslub.c635 static inline bool slab_test_pfmemalloc(const struct slab *slab) in slab_test_pfmemalloc() argument
637 return test_bit(SL_pfmemalloc, &slab->flags.f); in slab_test_pfmemalloc()
640 static inline void slab_set_pfmemalloc(struct slab *slab) in slab_set_pfmemalloc() argument
642 set_bit(SL_pfmemalloc, &slab->flags.f); in slab_set_pfmemalloc()
645 static inline void __slab_clear_pfmemalloc(struct slab *slab) in __slab_clear_pfmemalloc() argument
647 __clear_bit(SL_pfmemalloc, &slab->flags.f); in __slab_clear_pfmemalloc()
653 static __always_inline void slab_lock(struct slab *slab) in slab_lock() argument
655 bit_spin_lock(SL_locked, &slab->flags.f); in slab_lock()
658 static __always_inline void slab_unlock(struct slab *slab) in slab_unlock() argument
660 bit_spin_unlock(SL_locked, &slab->flags.f); in slab_unlock()
[all …]
H A Dusercopy.c168 struct slab *slab; in check_heap_object() local
194 slab = page_slab(page); in check_heap_object()
195 if (slab) { in check_heap_object()
197 __check_heap_object(ptr, n, slab, to_user); in check_heap_object()
H A Dslab_common.c623 static void kmem_obj_info(struct kmem_obj_info *kpp, void *object, struct slab *slab) in kmem_obj_info() argument
625 if (__kfence_obj_info(kpp, object, slab)) in kmem_obj_info()
627 __kmem_obj_info(kpp, object, slab); in kmem_obj_info()
649 struct slab *slab; in kmem_dump_obj() local
656 slab = virt_to_slab(object); in kmem_dump_obj()
657 if (!slab) in kmem_dump_obj()
660 kmem_obj_info(&kp, object, slab); in kmem_dump_obj()
1281 struct slab *slab; in bpf_get_kmem_cache() local
1286 slab = virt_to_slab((void *)(long)addr); in bpf_get_kmem_cache()
1287 return slab ? slab->slab_cache : NULL; in bpf_get_kmem_cache()
[all …]
H A Dmemcontrol.c2864 struct mem_cgroup *mem_cgroup_from_obj_slab(struct slab *slab, void *p) in mem_cgroup_from_obj_slab() argument
2875 obj_exts = slab_obj_exts(slab); in mem_cgroup_from_obj_slab()
2879 if (!slab_needs_objcg(slab)) in mem_cgroup_from_obj_slab()
2883 obj_ext = slab_obj_ext(slab->slab_cache, slab, obj_exts, p); in mem_cgroup_from_obj_slab()
2884 objcg = slab_obj_ext_objcg(slab, obj_ext); in mem_cgroup_from_obj_slab()
2905 struct slab *slab; in mem_cgroup_from_virt() local
2910 slab = virt_to_slab(p); in mem_cgroup_from_virt()
2911 if (slab) in mem_cgroup_from_virt()
2912 return mem_cgroup_from_obj_slab(slab, p); in mem_cgroup_from_virt()
3546 struct slab *slab; in __memcg_slab_post_alloc_hook() local
[all …]
/linux/tools/mm/
H A Dslabinfo.c54 struct slabinfo *slab; member
114 "slabinfo [-aABDefhilLnoPrsStTUvXz1] [N=K] [-dafzput] [slab-regexp]\n" in usage()
246 snprintf(x, 128, "/sys/kernel/debug/slab/%s/%s", s->name, name); in read_debug_slab_obj()
351 * Find the shortest alias of a slab
359 if (a->slab == find && in find_one_alias()
797 fprintf(stderr, "%s can only enable trace for one slab at a time\n", s->name); in slab_debug()
818 /* Number of slabs in a slab cache */ in totals()
822 /* Size of the whole slab */ in totals()
826 /* Bytes used for object storage in a slab */ in totals()
833 /* Number of objects in a slab */ in totals()
1209 slab_mismatch(char * slab) slab_mismatch() argument
1218 struct slabinfo *slab = slabinfo; read_slab_dir() local
1326 struct slabinfo *slab; output_slabs() local
[all...]
/linux/Documentation/ABI/testing/
H A Dsysfs-kernel-slab1 What: /sys/kernel/slab
7 The /sys/kernel/slab directory contains a snapshot of the
13 What: /sys/kernel/slab/<cache>/aliases
22 What: /sys/kernel/slab/<cache>/align
31 What: /sys/kernel/slab/<cache>/alloc_calls
41 Documentation/admin-guide/mm/slab.rst).
43 What: /sys/kernel/slab/<cache>/alloc_fastpath
54 What: /sys/kernel/slab/<cache>/alloc_from_partial
60 The alloc_from_partial file shows how many times a cpu slab has
61 been full and it has been refilled by using a slab from the list
[all …]
/linux/mm/kasan/
H A Dcommon.c45 struct slab *kasan_addr_to_slab(const void *addr) in kasan_addr_to_slab()
155 void __kasan_poison_slab(struct slab *slab) in __kasan_poison_slab() argument
157 struct page *page = slab_page(slab); in __kasan_poison_slab()
461 struct slab *slab; in __kasan_krealloc() local
479 slab = virt_to_slab(object); in __kasan_krealloc()
482 if (unlikely(!slab)) in __kasan_krealloc()
485 poison_kmalloc_redzone(slab->slab_cache, object, size, flags); in __kasan_krealloc()
522 struct slab *slab; in __kasan_mempool_poison_object() local
534 slab = page_slab(page); in __kasan_mempool_poison_object()
536 if (check_slab_allocation(slab->slab_cache, ptr, ip)) in __kasan_mempool_poison_object()
[all …]
H A Dgeneric.c541 struct slab *slab = kasan_addr_to_slab(addr); in kasan_record_aux_stack() local
546 if (is_kfence_address(addr) || !slab) in kasan_record_aux_stack()
549 cache = slab->slab_cache; in kasan_record_aux_stack()
550 object = nearest_obj(cache, slab, addr); in kasan_record_aux_stack()
/linux/scripts/gdb/linux/
H A Dslab.py38 def slab_folio(slab): argument
39 return slab.cast(gdb.lookup_type("struct folio").pointer())
41 def slab_address(slab): argument
43 folio = slab_folio(slab)
155 def __fill_map(obj_map, cache, slab): argument
156 p = slab['freelist']
157 addr = slab_address(slab)
165 for slab in lists.list_for_each_entry(slab_list, slab_ptr_type, "slab_list"):
167 __fill_map(obj_map, cache, slab)
168 addr = slab_address(slab)
[all …]
/linux/tools/cgroup/
H A Dmemcg_slabinfo.py73 for slab in list_for_each_entry('struct slab', n.partial.address_of_(),
75 nr_objs += fn(slab)
79 def count_free(slab): argument
80 return slab.objects - slab.inuse
194 for slab in for_each_slab(prog):
195 objcg_vec_raw = slab.memcg_data.value_()
198 cache = slab.slab_cache
/linux/lib/
H A Dsg_pool.c13 struct kmem_cache *slab; member
150 sgp->slab = kmem_cache_create(sgp->name, size, 0, in sg_pool_init()
152 if (!sgp->slab) { in sg_pool_init()
159 sgp->slab); in sg_pool_init()
174 kmem_cache_destroy(sgp->slab); in sg_pool_init()
/linux/Documentation/admin-guide/mm/
H A Dslab.rst2 Short users guide for the slab allocator
5 The slab allocator includes full debugging support (when built with
37 slab_debug=<Debug-Options>,<slab name1>,<slab name2>,...
44 of the first "select slabs" blocks that matches the slab's name are applied.
56 caused higher minimum slab orders
69 end of the slab name, in order to cover all slabs with the same prefix. For
75 Red zoning and tracking may realign the slab. We can just apply sanity checks
80 Debugging options may require the minimum possible slab order to increase as
82 sizes). This has a higher likelihood of resulting in slab allocation errors
88 You can apply different options to different list of slab names, using blocks
[all …]
/linux/include/linux/
H A Dkfence.h222 bool __kfence_obj_info(struct kmem_obj_info *kpp, void *object, struct slab *slab);
246 static inline bool __kfence_obj_info(struct kmem_obj_info *kpp, void *object, struct slab *slab) in __kfence_obj_info() argument
/linux/Documentation/translations/zh_CN/dev-tools/
H A Dkasan.rst64 通用KASAN支持在所有的slab、page_alloc、vmap、vmalloc、堆栈和全局内存
67 基于软件标签的KASAN支持slab、page_alloc、vmalloc和堆栈内存。
69 基于硬件标签的KASAN支持slab、page_alloc和不可执行的vmalloc内存。
71 对于slab,两种软件KASAN模式都支持SLUB和SLAB分配器,而基于硬件标签的
89 要将受影响的slab对象的alloc和free堆栈跟踪包含到报告中,请启用
140 BUG: KASAN: slab-out-of-bounds in kmalloc_oob_right+0xa8/0xbc [kasan_test]
196 flags: 0x200000000000100(slab)
211 堆栈跟踪、所访问内存分配位置的堆栈跟踪(对于访问了slab对象的情况)以及对象
213 slab对象的描述以及关于访问的内存页的信息。
231 请注意,KASAN错误标题(如 ``slab-out-of-bounds`` 或 ``use-after-free`` )
/linux/net/dccp/
H A Dccid.c
/linux/tools/perf/Documentation/
H A Dperf-kmem.txt47 Sort the output (default: 'frag,hit,bytes' for slab and 'bytes,hit'
49 pingpong, frag' for slab and 'page, callsite, bytes, hit, order,
51 mode selection options - i.e. --slab, --page, --alloc and/or --caller.
60 --slab::
/linux/tools/testing/scatterlist/
H A DMakefile17 … $(OFILES) scatterlist.c linux/scatterlist.h linux/highmem.h linux/kmemleak.h linux/slab.h asm/io.h
31 @touch linux/slab.h
/linux/Documentation/translations/zh_CN/mm/
H A Dsplit_page_table_lock.rst62 确保架构不使用slab分配器来分配页表:slab使用page->slab_cache来分配其页
/linux/Documentation/translations/zh_CN/core-api/
H A Dmemory-allocation.rst131 如果你需要分配许多相同的对象,你可以使用slab缓存分配器。在使用缓存之前,应该用
137 和 `kvmalloc` 分配的内存。slab缓存应该用kmem_cache_free()来释放。不要忘记用
H A Dmm-api.rst49 include/linux/slab.h
51 mm/slab.c
/linux/tools/testing/memblock/
H A DMakefile11 DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o cmdline.o
/linux/Documentation/mm/
H A Dslab.rst10 .. kernel-doc:: mm/slab.h
H A Dallocation-profiling.rst82 separately: for example, slab object extension vectors, or when the slab
119 - When a slab object is allocated from KFENCE, its accounting is skipped.
/linux/block/
H A Dbio.c43 struct kmem_cache *slab; member
80 struct kmem_cache *slab; member
96 bslab->slab = kmem_cache_create(bslab->name, size, in create_bio_slab()
99 if (!bslab->slab) in create_bio_slab()
108 kmem_cache_destroy(bslab->slab); in create_bio_slab()
139 return bslab->slab; in bio_find_or_create_slab()
154 WARN_ON_ONCE(bslab->slab != bs->bio_slab); in bio_put_slab()
163 kmem_cache_destroy(bslab->slab); in bio_put_slab()
207 kmem_cache_free(biovec_slab(bio->bi_max_vecs)->slab, in bio_free()
579 bvecs = kmem_cache_alloc(bvs->slab, gfp); in bio_alloc_bioset()
[all …]

123