函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:enable_cpucache

函数原型:static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp)

返回类型:int

参数:

类型参数名称
struct kmem_cache *cachep
gfp_tgfp
3920  limit等于0
3921  shared等于0
3922  batchcount等于0
3924  err等于cache_random_seq_create(cachep, num, gfp)
3925  如果err则转到:end
3928  如果非is_root_cache(cachep)则
3929  root等于memcg_root_cache(cachep)
3930  limit等于limit
3931  shared等于shared
3932  batchcount等于batchcount
3935  如果limitsharedbatchcount则转到:skip_setup
3946  如果The size of an object including metadata 大于131072则limit等于1
3948  否则如果The size of an object including metadata 大于PAGE_SIZElimit等于8
3950  否则如果The size of an object including metadata 大于1024则limit等于24
3952  否则如果The size of an object including metadata 大于256则limit等于54
3954  否则limit等于120
3966  shared等于0
3967  如果The size of an object including metadata 小于等于PAGE_SIZEnum_possible_cpus()大于1则shared等于8
3978  batchcount等于limit加1的和除2
3979  skip_setup :
3980  err等于do_tune_cpucache(cachep, limit, batchcount, shared, gfp)
3981  end :
3982  如果err打印错误信息("enable_cpucache failed for %s, error %d\n", Name (only for display!) , - err)
3985  返回:err
调用者
名称描述
kmem_cache_init_lateslab分配器后期初始化
setup_cpu_cache