函数逻辑报告 |
Source Code:mm\slab.c |
Create Date:2022-07-27 17:19:19 |
| Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:A interface to enable slab creation on nodeid
函数原型:static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
返回类型:void
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct kmem_cache * | cachep | |
| gfp_t | flags | |
| int | nodeid |
| 3224 | void * obj = NULL |
| 3225 | void * list = NULL |
| 3227 | VM_BUG_ON(nodeid < 0 || nodeid >= MAX_NUMNODES) |
| 3231 | check_irq_off() |
| 3232 | 加自旋锁 |
| 3233 | page等于get_first_slab(n, false) |
| 3239 | STATS_INC_NODEALLOCS(cachep) |
| 3240 | STATS_INC_ACTIVE(cachep) |
| 3241 | STATS_SET_HIGH(cachep) |
| 3245 | obj等于slab_get_obj(cachep, page) |
| 3246 | free_objects自减 |
| 3248 | fixup_slab_list(cachep, n, page, & list) |
| 3250 | 自旋锁解锁 |
| 3251 | fixup_objfreelist_debug(cachep, & list) |
| 3252 | 返回:obj |
| 3254 | must_grow : |
| 3255 | 自旋锁解锁 |
| 3256 | 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. |
| 3257 | 如果page则 |
| 3259 | obj等于slab_get_obj(cachep, page) |
| 3261 | cache_grow_end(cachep, page) |
| 名称 | 描述 |
|---|---|
| alternate_node_alloc | Try allocating on another node if PFA_SPREAD_SLAB is a mempolicy is set.* If we are in_interrupt, then process context, including cpusets and* mempolicy, may not apply and should not be used for allocation policy. |
| fallback_alloc | Fallback function if there was no memory available and no objects on a* certain node and fall back is permitted. First we scan all the* available node for available objects. If that fails then we* perform an allocation without specifying a node |
| slab_alloc_node | |
| __do_cache_alloc |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |