| Function report | 
| Source Code: mm\slab.c | Create Date:2022-07-28 15:44:38 | 
| Last Modify:2022-05-23 17:02:55 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:drain_freelist
Proto:static int drain_freelist(struct kmem_cache *cache, struct kmem_cache_node *n, int tofree)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct kmem_cache * | cache | |
| struct kmem_cache_node * | n | |
| int | tofree | 
| 2237 | nr_freed = 0 | 
| 2238 | When nr_freed < tofree && Not list_empty - tests whether a list is empty*@head: the list to test. cycle | 
| 2240 | spin_lock_irq( & list_lock) | 
| 2242 | If p == slabs_free Then | 
| 2243 | spin_unlock_irq( & list_lock) | 
| 2244 | Go to out | 
| 2249 | free_slabs-- | 
| 2250 | total_slabs-- | 
| 2255 | free_objects -= num | 
| 2256 | spin_unlock_irq( & list_lock) | 
| 2258 | nr_freed++ | 
| 2260 | out : | 
| 2261 | Return nr_freed | 
| Name | Describe | 
|---|---|
| drain_cache_node_node | Drains freelist for a node on each slab cache, used for memory hot-remove.* Returns -EBUSY if all objects cannot be drained so that the node is not* removed.* Must hold slab_mutex. | 
| __kmem_cache_shrink | |
| cache_reap | ache_reap - Reclaim memory from caches | 
| 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 |