Function report |
Source Code:mm\slab.c |
Create Date:2022-07-28 15:45:13 |
Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:cache_alloc_refill
Proto:static void *cache_alloc_refill(struct kmem_cache *cachep, gfp_t flags)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If Not touched && batchcount > BATCHREFILL_LIMIT Then |
2974 | batchcount = BATCHREFILL_LIMIT |
2980 | If Not free_objects && ( Not shared || Not avail ) Then Go to direct_grow |
2988 | touched = 1 |
2989 | Go to alloc_done |
2992 | When batchcount > 0 cycle |
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 | spin_unlock( & list_lock) |
3008 | fixup_objfreelist_debug(cachep, & list) |
3010 | direct_grow : |
3011 | If Value for the false possibility is greater at compile time(!avail) Then |
3013 | If sk_memalloc_socks() Then |
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 | If Not avail && page Then 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 | If Not avail Then Return NULL |
3034 | touched = 1 |
3036 | Return Must have this definition in here for the proper* alignment of array_cache. Also simplifies accessing* the entries.[--avail] |
Name | Describe |
---|---|
____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 |