函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-27 17:18:57
Last Modify:2022-05-23 17:02:55 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_first_slab

函数原型:static struct page *get_first_slab(struct kmem_cache_node *n, bool pfmemalloc)

返回类型:struct page

参数:

类型参数名称
struct kmem_cache_node *n
boolpfmemalloc
2885  assert_spin_locked( & list_lock)
2886  page等于list_first_entry_or_null - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.( & slabs_partial, structpage, slab_list)
2888  如果非page
2889  free_touched等于1
2890  page等于list_first_entry_or_null - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.( & slabs_free, structpage, slab_list)
2892  如果pagefree_slabs自减
2896  如果sk_memalloc_socks()则page等于Try to find non-pfmemalloc slab if needed
2899  返回:page
调用者
名称描述
cache_alloc_pfmemalloc
cache_alloc_refill
____cache_alloc_nodeA interface to enable slab creation on nodeid