函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Always called with the slab_mutex held

函数原型:static int __do_tune_cpucache(struct kmem_cache *cachep, int limit, int batchcount, int shared, gfp_t gfp)

返回类型:int

参数:

类型参数名称
struct kmem_cache *cachep
intlimit
intbatchcount
intshared
gfp_tgfp
3850  __percpucpu_cache
3853  cpu_cache等于alloc_kmem_cache_cpus(cachep, limit, batchcount)
3854  如果非cpu_cache则返回:负ENOMEM
3857  prev等于cpu_cache
3858  cpu_cache等于cpu_cache
3863  如果prevkick_all_cpus_sync()
3866  check_irq_on()
3867  batchcount等于batchcount
3868  limit等于limit
3869  shared等于shared
3871  如果非prev则转到:setup_node
3874  遍历在线CPU(cpu)
3875  LIST_HEAD(list)
3878  ac等于per_cpu_ptr(prev, cpu)
3880  node等于cpu_to_mem(cpu)
3881  n等于get_node(cachep, node)
3882  spin_lock_irq( & list_lock)
3883  Caller needs to acquire correct kmem_cache_node's list_lock*@list: List of detached free slabs should be freed by caller
3884  spin_unlock_irq( & list_lock)
3885  slabs_destroy(cachep, & list)
3887  释放内存
3889  setup_node :
3890  返回:This initializes kmem_cache_node or resizes various caches for all nodes.
调用者
名称描述
do_tune_cpucache