Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slub.c Create Date:2022-07-28 15:47:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static inline void *acquire_slab(struct kmem_cache *s, struct kmem_cache_node *n, struct page *page, int mode, int *objects)

Type:void

Parameter:

TypeParameterName
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  If mode Then
1810  SLUB = objects
1811  first free object = NULL
1812  Else
1813  first free object = freelist
1816  VM_BUG_ON(frozen)
1817  frozen = 1
1819  If Not Interrupts must be disabled (for the fallback code to work right) Then Return NULL
1825  remove_partial(n, page)
1826  WARN_ON(!freelist)
1827  Return freelist
Caller
NameDescribe
get_partial_nodeTry to allocate a partial slab from a specific node.