函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Remove slab from the partial list, freeze it and* return the pointer to the freelist.* Returns a list of objects or NULL if it fails.

函数原型:static inline void *acquire_slab(struct kmem_cache *s, struct kmem_cache_node *n, struct page *page, int mode, int *objects)

返回类型:void

参数:

类型参数名称
struct kmem_cache *s
struct kmem_cache_node *n
struct page *page
intmode
int *objects
1798  lockdep_assert_held( & list_lock)
1805  freelist等于 first free object
1806  counters等于 SLUB
1807  SLUB 等于counters
1808  objects等于objects SLUB
1809  如果mode
1810  SLUB 等于objects
1811  first free object = NULL
1812  否则
1813  first free object 等于freelist
1816  VM_BUG_ON(frozen)
1817  frozen等于1
1819  如果非Interrupts must be disabled (for the fallback code to work right) 则返回:NULL
1825  remove_partial(n, page)
1826  WARN_ON(!freelist)
1827  返回:freelist
调用者
名称描述
get_partial_nodeTry to allocate a partial slab from a specific node.