Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Note that interrupts must be enabled when calling this function.

Proto:int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, void **p)

Type:int

Parameter:

TypeParameterName
struct kmem_cache *s
gfp_tflags
size_tsize
void **p
3143  s = slab_pre_alloc_hook(s, flags)
3144  If Value for the false possibility is greater at compile time(!s) Then Return false
3151  local_irq_disable()
3152  c = this_cpu_ptr(cpu_slab)
3154  When i < size cycle
3155  object = Pointer to next available object
3167  c = this_cpu_ptr(cpu_slab)
3170  Continue
3172  Pointer to next available object = get_freepointer(s, object)
3173  p[i] = object
3174  If the object has been wiped upon free, make sure it's fully initialized by* zeroing out freelist pointer.
3176  Globally unique transaction id = next_tid( Globally unique transaction id )
3177  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
3180  If Value for the false possibility is greater at compile time(slab_want_init_on_alloc(flags, s)) Then
3183  When j < i cycle memset(p[j], 0, The size of an object without metadata )
3188  slab_post_alloc_hook(s, flags, size, p)
3189  Return i
3190  error :
3191  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
3192  slab_post_alloc_hook(s, flags, i, p)
3193  __kmem_cache_free_bulk(s, i, p)
3194  Return 0
Caller
NameDescribe
do_kmem_cache_size_bulk