函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-27 17:18:05
Last Modify:2022-05-23 17:02:55 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:alloc_kmem_cache_cpus

函数原型:static struct array_cache __percpu *alloc_kmem_cache_cpus(struct kmem_cache *cachep, int entries, int batchcount)

返回类型:struct array_cache

参数:

类型参数名称
struct kmem_cache *cachep
intentries
intbatchcount
1775  __percpucpu_cache
1777  size等于*的长度乘entriessizeof(structarray_cache)
1778  cpu_cache等于__alloc_percpu - allocate dynamic percpu area*@size: size of area to allocate in bytes*@align: alignment of area (max PAGE_SIZE)* Equivalent to __alloc_percpu_gfp(size, align, %GFP_KERNEL).
1780  如果非cpu_cache则返回:NULL
1783  遍历可用CPU(cpu)
1784  init_arraycache(per_cpu_ptr(cpu_cache, cpu), entries, batchcount)
1788  返回:cpu_cache
调用者
名称描述
setup_cpu_cache
__do_tune_cpucacheAlways called with the slab_mutex held