函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slub.c Create Date:2022-07-27 17:21:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Remove the cpu slab

函数原型:static void deactivate_slab(struct kmem_cache *s, struct page *page, void *freelist, struct kmem_cache_cpu *c)

返回类型:void

参数:

类型参数名称
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
2045  l等于M_NONE, m等于M_NONE
2047  tail等于 Cpu slab was moved to the head of partials
2051  如果 first free object
2052  stat(s, Slab contained remotely freed objects )
2053  tail等于 Cpu slab was moved to the tail of partials
2064 freelistnextfree等于get_freepointer(s, freelist)循环
2068  循环
2070  counters等于 SLUB
2072  SLUB 等于counters
2073  SLUB 自减
2074  VM_BUG_ON(!frozen)
2076  当非Interrupts must be disabled (for the fallback code to work right) 循环
2081  freelist等于nextfree
2098  redo :
2100  first free object 等于 first free object
2101  SLUB 等于 SLUB
2102  VM_BUG_ON(!frozen)
2105  SLUB 等于 SLUB
2106  如果freelist
2107  SLUB 自减
2108  set_freepointer(s, freelist, first free object )
2109  first free object 等于freelist
2110  否则 first free object 等于 first free object
2113  frozen等于0
2115  如果非 SLUB nr_partial大于等于min_partialm等于M_FREE
2117  否则如果 first free object
2118  m等于M_PARTIAL
2119  如果非lock
2120  lock等于1
2126  加自旋锁
2128  否则
2129  m等于M_FULL
2131  lock等于1
2137  加自旋锁
2141  如果l不等于m
2142  如果l恒等于M_PARTIALremove_partial(n, page)
2144  否则如果l恒等于M_FULLremove_full(s, n, page)
2147  如果m恒等于M_PARTIALadd_partial(n, page, tail)
2149  否则如果m恒等于M_FULLadd_full(s, n, page)
2153  l等于m
2154  如果非Interrupts must be disabled (for the fallback code to work right) 则转到:redo
2160  如果lock自旋锁解锁
2163  如果m恒等于M_PARTIALstat(s, tail)
2165  否则如果m恒等于M_FULLstat(s, Cpu slab was full when deactivated )
2167  否则如果m恒等于M_FREE
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
调用者
名称描述
flush_slab
___slab_allocSlow 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