Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-28 15:44:45
Last Modify:2022-05-23 17:02:55 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Get the memory for a slab management obj.* For a slab cache when the slab descriptor is off-slab, the* slab descriptor can't come from the same cache which is being created,* Because if it is the case, that means we defer the creation of

Proto:static void *alloc_slabmgmt(struct kmem_cache *cachep, struct page *page, int colour_off, gfp_t local_flags, int nodeid)

Type:void

Parameter:

TypeParameterName
struct kmem_cache *cachep
struct page *page
intcolour_off
gfp_tlocal_flags
intnodeid
2347  addr = page_address(page)
2349  slab: first object = addr + colour_off
2350  SLAB = 0
2352  If OBJFREELIST_SLAB(cachep) Then freelist = NULL
2354  Else if OFF_SLAB(cachep) Then
2356  freelist = kmem_cache_alloc_node(freelist_cache, local_flags, nodeid)
2358  If Not freelist Then Return NULL
2360  Else
2362  freelist = addr + (PAGE_SIZE << gfporder) - freelist_size
2366  Return freelist
Caller
NameDescribe
cache_grow_beginGrow (by 1) the number of slabs within a cache. This is called by* kmem_cache_alloc() when there are no active objs left in a cache.