函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_xarray.c Create Date:2022-07-27 07:31:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:check_xa_shrink

函数原型:static noinline void check_xa_shrink(struct xarray *xa)

返回类型:void

参数:

类型参数名称
struct xarray *xa
301  XA_STATE() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.* Declare and initialise an xa_state on the stack.(xas, xa, 1)
304  max_order等于如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_XARRAY_MULTI)则15否则1
306  XA_BUG_ON(xa, !xa_empty() - Determine if an array has any present entries.*@xa: XArray.* Context: Any context.* Return: %true if the array contains only NULL pointers.)
307  XA_BUG_ON(xa, xa_store_index(xa, 0, GFP_KERNEL) != NULL)
308  XA_BUG_ON(xa, xa_store_index(xa, 1, GFP_KERNEL) != NULL)
314  xas_lock( & xas)
315  XA_BUG_ON(xa, xas_load() - Load an entry from the XArray (advanced).*@xas: XArray operation state.* Usually walks the @xas to the appropriate state to load the entry* stored at xa_index. However, it will do nothing and return %NULL if*@xas is in an error state != xa_mk_value() - Create an XArray entry from an integer.*@v: Value to store in XArray.* Context: Any context.* Return: An entry suitable for storing in the XArray.)
316  node等于xa_node
317  XA_BUG_ON(xa, Private != xa_mk_value() - Create an XArray entry from an integer.*@v: Value to store in XArray.* Context: Any context.* Return: An entry suitable for storing in the XArray.)
318  XA_BUG_ON(xa, xas_store() - Store this entry in the XArray != xa_mk_value() - Create an XArray entry from an integer.*@v: Value to store in XArray.* Context: Any context.* Return: An entry suitable for storing in the XArray.)
319  XA_BUG_ON(xa, xa_load() - Load an entry from an XArray.*@xa: XArray.*@index: index into array.* Context: Any context. Takes and releases the RCU lock.* Return: The entry at @index in @xa. != NULL)
320  XA_BUG_ON(xa, xa_node != XAS_BOUNDS)
321  XA_BUG_ON(xa, Private != XA_RETRY_ENTRY)
322  XA_BUG_ON(xa, xas_load() - Load an entry from the XArray (advanced).*@xas: XArray operation state.* Usually walks the @xas to the appropriate state to load the entry* stored at xa_index. However, it will do nothing and return %NULL if*@xas is in an error state != NULL)
323  xas_unlock( & xas)
324  XA_BUG_ON(xa, xa_load() - Load an entry from an XArray.*@xa: XArray.*@index: index into array.* Context: Any context. Takes and releases the RCU lock.* Return: The entry at @index in @xa. != xa_mk_value() - Create an XArray entry from an integer.*@v: Value to store in XArray.* Context: Any context.* Return: An entry suitable for storing in the XArray.)
325  xa_erase_index(xa, 0)
326  XA_BUG_ON(xa, !xa_empty() - Determine if an array has any present entries.*@xa: XArray.* Context: Any context.* Return: %true if the array contains only NULL pointers.)
328 order小于max_order循环
329  max等于1UL左移order位的值减1
330  If 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.
331  XA_BUG_ON(xa, xa_load() - Load an entry from an XArray.*@xa: XArray.*@index: index into array.* Context: Any context. Takes and releases the RCU lock.* Return: The entry at @index in @xa. != xa_mk_value() - Create an XArray entry from an integer.*@v: Value to store in XArray.* Context: Any context.* Return: An entry suitable for storing in the XArray.)
332  XA_BUG_ON(xa, xa_load() - Load an entry from an XArray.*@xa: XArray.*@index: index into array.* Context: Any context. Takes and releases the RCU lock.* Return: The entry at @index in @xa. != NULL)
333  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
334  node等于Private
335  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
336  XA_BUG_ON(xa, xa_store_index(xa, ULONG_MAX, GFP_KERNEL) != NULL)
338  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
339  XA_BUG_ON(xa, Private == node)
340  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
341  XA_BUG_ON(xa, xa_load() - Load an entry from an XArray.*@xa: XArray.*@index: index into array.* Context: Any context. Takes and releases the RCU lock.* Return: The entry at @index in @xa. != NULL)
342  xa_erase_index(xa, ULONG_MAX)
343  XA_BUG_ON(xa, xa_head != node)
344  xa_erase_index(xa, 0)
调用者
名称描述
xarray_checks