函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__kmem_cache_create - Create a cache.*@cachep: cache management descriptor*@flags: SLAB flags* Returns a ptr to the cache on success, NULL on failure.* Cannot be called within a int, but can be interrupted.

函数原型:int __kmem_cache_create(struct kmem_cache *cachep, slab_flags_t flags)

返回类型:int

参数:

类型参数名称
struct kmem_cache *cachep
slab_flags_tflags
1962  ralign等于Shouldn't this be in a header file somewhere?
1965  size等于The size of an object including metadata
1988  size等于@a is a power of 2 value (size, Shouldn't this be in a header file somewhere? )
1990  如果flags按位与DEBUG: Red zone objs in a cache
1991  ralign等于REDZONE_ALIGN
1994  size等于@a is a power of 2 value (size, REDZONE_ALIGN)
1998  如果ralign小于Alignment
1999  ralign等于Alignment
2002  如果ralign大于__alignof__(unsignedlonglong)则flags与等于DEBUG: Red zone objs in a cache 按位或DEBUG: Store the last owner for bug hunting 的值的反
2007  Alignment 等于ralign
2008  colour_off等于cache_line_size()
2010  如果colour_off小于Alignment colour_off等于Alignment
2013  如果slab_is_available()则gfp等于GFP_KERNEL
2015  否则gfp等于GFP_NOWAIT
2041  kasan_cache_create(cachep, & size, & flags)
2043  size等于@a is a power of 2 value (size, Alignment )
2048  如果FREELIST_BYTE_INDEXsize小于This restriction comes from byte sized index implementation.* Page size is normally 2^12 bytes and, in this case, if we want to use* byte sized index which can represent 2^8 entries, the size of the objectsize等于@a is a power of 2 value (This restriction comes from byte sized index implementation.* Page size is normally 2^12 bytes and, in this case, if we want to use* byte sized index which can represent 2^8 entries, the size of the object, Alignment )
2074  如果set_objfreelist_slab_cache(cachep, size, flags)则
2075  flags或等于CFLGS_OBJFREELIST_SLAB
2076  转到:done
2079  如果set_off_slab_cache(cachep, size, flags)则
2080  flags或等于CFLGS_OFF_SLAB
2081  转到:done
2084  如果set_on_slab_cache(cachep, size, flags)则转到:done
2087  返回:负E2BIG
2089  done :
2090  freelist_size等于numsizeof(freelist_idx_t)
2091  Used for retrieving partial slabs, etc. 等于flags
2092  gfp flags to use on each alloc 等于__GFP_COMP
2093  如果flags按位与Use GFP_DMA memory gfp flags to use on each alloc 或等于GFP_DMA
2095  如果flags按位与Use GFP_DMA32 memory gfp flags to use on each alloc 或等于GFP_DMA32
2097  如果flags按位与Objects are reclaimable 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
2099  The size of an object including metadata 等于size
2100  reciprocal_buffer_size等于For a description of the algorithm please have a look at* include/linux/reciprocal_div.h
2114  如果OFF_SLAB(cachep)则
2115  freelist_cache等于kmalloc_slab(freelist_size, 0u)
2119  err等于setup_cpu_cache(cachep, gfp)
2120  如果err
2121  __kmem_cache_release(cachep)
2122  返回:err
2125  返回:0