Function report |
Source Code:mm\slab.c |
Create Date:2022-07-28 15:45:26 |
Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:A interface to enable slab creation on nodeid
Proto:static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
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() |
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 | spin_unlock( & list_lock) |
3251 | fixup_objfreelist_debug(cachep, & list) |
3252 | Return obj |
3254 | must_grow : |
3255 | spin_unlock( & list_lock) |
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 | If page Then |
3259 | obj = slab_get_obj(cachep, page) |
3261 | cache_grow_end(cachep, page) |
Name | Describe |
---|---|
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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |