Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:alculate_sizes() determines the order and the distribution of data within* a slab object.

Proto:static int calculate_sizes(struct kmem_cache *s, int forced_order)

Type:int

Parameter:

TypeParameterName
struct kmem_cache *s
intforced_order
3495  flags = Used for retrieving partial slabs, etc.
3496  size = The size of an object without metadata
3504  size = @a is a power of 2 value (size, size of * )
3532  Offset to metadata = size
3534  If flags & (Defer freeing slabs to RCU | DEBUG: Poison objects ) || ctor Then
3544  Free pointer offset = size
3545  size += size of *
3557  kasan_cache_create(s, & size, & Used for retrieving partial slabs, etc. )
3580  size = @a is a power of 2 value (size, Alignment )
3581  The size of an object including metadata = size
3582  If forced_order >= 0 Then order = forced_order
3584  Else order = calculate_order(size)
3587  If order < 0 Then Return 0
3590  gfp flags to use on each alloc = 0
3591  If order Then gfp flags to use on each alloc |= __GFP_COMP
3594  If Used for retrieving partial slabs, etc. & Use GFP_DMA memory Then gfp flags to use on each alloc |= GFP_DMA
3597  If Used for retrieving partial slabs, etc. & Use GFP_DMA32 memory Then gfp flags to use on each alloc |= GFP_DMA32
3600  If Used for retrieving partial slabs, etc. & Objects are reclaimable Then gfp flags to use on each alloc |= DOC: Page mobility and placement hints* Page mobility and placement hints* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* These flags provide hints about how mobile the page is
3606  oo = oo_make(order, size)
3607  min = oo_make(get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory, size)
3608  If oo_objects(oo) > oo_objects(Allocation and freeing of slabs ) Then Allocation and freeing of slabs = oo
3611  Return Not Not oo_objects(oo)
Caller
NameDescribe
kmem_cache_open