Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Inlined fastpath so that allocation functions (kmalloc, kmem_cache_alloc)* have the fastpath folded into their functions. So no function call* overhead for requests that can be satisfied on the fastpath.

Proto:static __always_inline void *slab_alloc_node(struct kmem_cache *s, gfp_t gfpflags, int node, unsigned long addr)

Type:void

Parameter:

TypeParameterName
struct kmem_cache *s
gfp_tgfpflags
intnode
unsigned longaddr
2683  s = slab_pre_alloc_hook(s, gfpflags)
2684  If Not s Then Return NULL
2686  redo :
2697  Do
2698  tid = Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.( Globally unique transaction id )
2699  c = raw_cpu_ptr(cpu_slab)
2700  When IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_PREEMPT) && Value for the false possibility is greater at compile time(tid != READ_ONCE( Globally unique transaction id )) cycle
2711  The "volatile" is due to gcc bugs ()
2720  object = Pointer to next available object
2721  page = The slab from which we are allocating
2722  If Value for the false possibility is greater at compile time(!object || !Check if the objects in a per cpu structure fit numa* locality expectations.) Then
2723  object = Another one that disabled interrupt and compensates for possible* cpu changes by refetching the per cpu area pointer.
2724  stat(s, Allocation by getting a new cpu slab )
2725  Else
2726  next_object = get_freepointer_safe(s, object)
2747  note_cmpxchg_failure("slab_alloc", s, tid)
2748  Go to redo
2750  prefetch_freepointer(s, next_object)
2751  stat(s, Allocation from cpu slab )
2754  If the object has been wiped upon free, make sure it's fully initialized by* zeroing out freelist pointer.
2756  If Value for the false possibility is greater at compile time(slab_want_init_on_alloc(gfpflags, s)) && object Then memset(object, 0, The size of an object without metadata )
2759  slab_post_alloc_hook(s, gfpflags, 1, & object)
2761  Return object
Caller
NameDescribe
slab_alloc
kmem_cache_alloc_node
__kmalloc_node
__kmalloc_node_track_caller
kmem_cache_alloc_nodekmem_cache_alloc_node - Allocate an object on the specified node*@cachep: The cache to allocate from.*@flags: See kmalloc().*@nodeid: node number of the target node.* Identical to kmem_cache_alloc but it will allocate memory on the given