Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:xas_nomem() - Allocate memory if needed.*@xas: XArray operation state.*@gfp: Memory allocation flags.* If we need to add new nodes to the XArray, we try to allocate memory* with GFP_NOWAIT while holding the lock, which will usually succeed.

Proto:bool xas_nomem(struct xa_state *xas, gfp_t gfp)

Type:bool

Parameter:

TypeParameterName
struct xa_state *xas
gfp_tgfp
298  If xa_node != We encode errnos in the xas->xa_node. If an error has happened, we need to* drop the lock to fix it, and once we've done so the xa_state is invalid.( - ENOMEM) Then
299  xas_destroy() - Free any resources allocated during the XArray operation.*@xas: XArray operation state.* This function is now internal-only.
300  Return false
302  If private: The rest of the data structure is not to be used directly. & XA_FLAGS_ACCOUNT Then gfp |= __GFP_ACCOUNT
304  xa_alloc = kmem_cache_alloc(Move the radix tree node cache here , gfp)
305  If Not xa_alloc Then Return false
307  XA_NODE_BUG_ON(xa_alloc, !list_empty - tests whether a list is empty*@head: the list to test.)
308  xa_node = XAS_RESTART
309  Return true
Caller
NameDescribe
xa_store_rangexa_store_range() - Store this entry at a range of indices in the XArray
ida_alloc_rangeda_alloc_range() - Allocate an unused ID.*@ida: IDA handle.*@min: Lowest ID to allocate.*@max: Highest ID to allocate.*@gfp: Memory allocation flags.* Allocate an ID between @min and @max, inclusive. The allocated ID will
xa_store_orderIf anyone needs this, please move it to xarray.c. We have no current* users outside the test suite because all current multislot users want* to use the advanced API.
check_xas_erase
__check_store_iter
xa_store_many_order
check_create_range_4
check_workingset
add_to_swap_cacheadd_to_swap_cache resembles add_to_page_cache_locked on swapper_space,* but sets SwapCache flag and private instead of mapping and index.