| Function report | 
| Source Code: mm\slub.c | Create Date:2022-07-28 15:48:02 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Remove the cpu slab
Proto:static void deactivate_slab(struct kmem_cache *s, struct page *page, void *freelist, struct kmem_cache_cpu *c)
Type:void
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct kmem_cache * | s | |
| struct page * | page | |
| void * | freelist | |
| struct kmem_cache_cpu * | c | 
| 2042 | enum slab_modes{M_NONE, M_PARTIAL, M_FULL, M_FREE} | 
| 2043 | n = get_node(s, page_to_nid(page)) | 
| 2044 | lock = 0 | 
| 2051 | If first free object Then | 
| 2068 | Do | 
| 2098 | redo : | 
| 2106 | If freelist Then | 
| 2107 | SLUB -- | 
| 2108 | set_freepointer(s, freelist, first free object ) | 
| 2109 | first free object = freelist | 
| 2110 | Else first free object = first free object | 
| 2113 | frozen = 0 | 
| 2115 | If Not SLUB && nr_partial >= min_partial Then m = M_FREE | 
| 2117 | Else if first free object Then | 
| 2128 | Else | 
| 2142 | If l == M_PARTIAL Then remove_partial(n, page) | 
| 2154 | If Not Interrupts must be disabled (for the fallback code to work right) Then Go to redo | 
| 2160 | If lock Then spin_unlock( & list_lock) | 
| 2165 | Else if m == M_FULL Then stat(s, Cpu slab was full when deactivated ) | 
| 2168 | stat(s, Cpu slab was empty when deactivated ) | 
| 2169 | discard_slab(s, page) | 
| 2170 | stat(s, Slab freed to the page allocator ) | 
| 2173 | The slab from which we are allocating = NULL | 
| 2174 | Pointer to next available object = NULL | 
| Name | Describe | 
|---|---|
| flush_slab | |
| ___slab_alloc | Slow path. The lockless freelist is empty or we need to perform* debugging duties.* Processing is still very fast if new objects have been freed to the* regular freelist. In that case we simply take over the regular freelist | 
| 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 |