函数逻辑报告 |
Source Code:mm\slab.c |
Create Date:2022-07-27 17:20:07 |
Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:enable_cpucache
函数原型:static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct kmem_cache * | cachep | |
gfp_t | gfp |
3920 | limit等于0 |
3921 | shared等于0 |
3922 | batchcount等于0 |
3924 | err等于cache_random_seq_create(cachep, num, gfp) |
3928 | 如果非is_root_cache(cachep)则 |
3929 | root等于memcg_root_cache(cachep) |
3932 | batchcount等于batchcount |
3935 | 如果limit且shared且batchcount则转到:skip_setup |
3946 | 如果The size of an object including metadata 大于131072则limit等于1 |
3948 | 否则如果The size of an object including metadata 大于PAGE_SIZE则limit等于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_SIZE且num_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_late | slab分配器后期初始化 |
setup_cpu_cache |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |