函数逻辑报告 |
Source Code:mm\slab.c |
Create Date:2022-07-27 17:19:06 |
Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:cache_alloc_refill
函数原型:static void *cache_alloc_refill(struct kmem_cache *cachep, gfp_t flags)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct kmem_cache * | cachep | |
gfp_t | flags |
2960 | void * list = NULL |
2963 | check_irq_off() |
2966 | ac等于cpu_cache_get(cachep) |
2967 | batchcount等于batchcount |
2968 | 如果非touched且batchcount大于BATCHREFILL_LIMIT则 |
2974 | batchcount等于BATCHREFILL_LIMIT |
2980 | 如果非free_objects且非shared或非avail的值则转到:direct_grow |
2983 | 加自旋锁 |
2988 | touched等于1 |
2989 | 转到:alloc_done |
2992 | 当batchcount大于0循环 |
2994 | page等于get_first_slab(n, false) |
3000 | batchcount等于Slab list should be fixed up by fixup_slab_list() for existing slab* or cache_grow_end() for new slab |
3001 | fixup_slab_list(cachep, n, page, & list) |
3004 | must_grow : |
3005 | free_objects减等于avail |
3006 | alloc_done : |
3007 | 自旋锁解锁 |
3008 | fixup_objfreelist_debug(cachep, & list) |
3010 | direct_grow : |
3011 | 如果此条件成立可能性小(为编译器优化)(!avail)则 |
3013 | 如果sk_memalloc_socks()则 |
3020 | page等于Grow (by 1) the number of slabs within a cache. This is called by* kmem_cache_alloc() when there are no active objs left in a cache. |
3026 | ac等于cpu_cache_get(cachep) |
3027 | 如果非avail且page则Slab list should be fixed up by fixup_slab_list() for existing slab* or cache_grow_end() for new slab |
3029 | cache_grow_end(cachep, page) |
3031 | 如果非avail则返回:NULL |
3034 | touched等于1 |
3036 | 返回:Must have this definition in here for the proper* alignment of array_cache. Also simplifies accessing* the entries.[--avail] |
名称 | 描述 |
---|---|
____cache_alloc |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |