Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\radix-tree.c Create Date:2022-07-28 06:12:57
Last Modify:2022-05-21 10:04:37 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Load up this CPU's radix_tree_node buffer with sufficient objects to* ensure that the addition of a single element in the tree cannot fail

Proto:static __must_check int __radix_tree_preload(gfp_t gfp_mask, unsigned nr)

Type:int

Parameter:

TypeParameterName
gfp_tgfp_mask
unsignednr
336  ret = -ENOMEM
342  gfp_mask &= ~__GFP_ACCOUNT
344  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
345  rtp = this_cpu_ptr( & radix_tree_preloads)
346  When nr < nr cycle
347  preempt_enable()
348  node = kmem_cache_alloc(Radix tree node cache., gfp_mask)
349  If (node == NULL) Then Go to out
351  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
352  rtp = this_cpu_ptr( & radix_tree_preloads)
353  If nr < nr Then
356  nr++
357  Else
361  ret = 0
362  out :
363  Return ret
Caller
NameDescribe
radix_tree_preloadLoad up this CPU's radix_tree_node buffer with sufficient objects to* ensure that the addition of a single element in the tree cannot fail
radix_tree_maybe_preloadThe same as above function, except we don't guarantee preloading happens.* We do it, if we decide it helps. On success, return zero with preemption* disabled. On error, return -ENOMEM with preemption not disabled.
idr_preloaddr_preload - preload for idr_alloc()*@gfp_mask: allocation mask to use for preloading* Preallocate memory to use for the next call to idr_alloc(). This function* returns with preemption disabled. It will be enabled by idr_preload_end().