函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:xas_store() - Store this entry in the XArray

函数原型:void *xas_store(struct xa_state *xas, void *entry)

返回类型:void

参数:

类型参数名称
struct xa_state *xas
void *entry
772  __rcuslot等于xa_head
774  count等于0
775  values等于0
777  value等于xa_is_value() - Determine if an entry is a value.*@entry: XArray entry.* Context: Any context.* Return: True if the entry is a value, false if it is a pointer.
779  如果entry
780  allow_root等于非Private 且非xa_is_zero() - Is the entry a zero entry?*@entry: Entry retrieved from the XArray* The normal API will return NULL as the contents of a slot containing* a zero entry. You can only see zero entries by using the advanced API.
781  first等于xas_create() - Create a slot to store an entry in.*@xas: XArray operation state.*@allow_root: %true if we can store the entry in the root directly* Most users will not need to call this function directly, as it is called* by xas_store()
782  否则
783  first等于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
786  如果xas_invalid() - Is the xas in a retry or error state?*@xas: XArray operation state.* Return: %true if the xas cannot be used for operations.则返回:first
788  node等于xa_node
789  如果nodexa_shift小于Bits remaining in each slot xa_sibs等于0
791  如果first恒等于entry且非xa_sibs则返回:first
794  next等于first
795  offset等于xa_offset
796  max等于xa_offsetxa_sibs
797  如果node
798  slot等于slots[offset]
799  如果xa_sibsxas_squash_marks() - Merge all marks to the first entry*@xas: Array operation state.* Set a mark on the first entry if any entry has it set. Clear marks on* all sibling entries.
802  如果非entryxas_init_marks() - Initialise all marks for the entry*@xas: Array operations state
805  循环
813  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization( * slot, entry)
814  如果Private 且非nodeBits remaining in each slot 的值则xas_free_nodes() - Free this node and all nodes that it references*@xas: Array operation state.*@top: Node to free* This node has been removed from the tree. We must now free it and all* of its subnodes
816  如果非node退出
818  count加等于非next减非entry
819  values加等于非xa_is_value() - Determine if an entry is a value.*@entry: XArray entry.* Context: Any context.* Return: True if the entry is a value, false if it is a pointer.减非value
820  如果entry
821  如果offset恒等于max退出
825  否则
826  如果offset恒等于XA_CHUNK_MASK退出
829  next等于Private
831  如果非entryoffset大于max退出
833  first等于next
835  slot自加
838  update_node(xas, node, count, values)
839  返回:first
调用者
名称描述
__xa_erase__xa_erase() - Erase this entry from the XArray while locked.*@xa: XArray.*@index: Index into array.* After this function returns, loading from @index will return %NULL.* If the index is part of a multi-index entry, all indices will be erased
__xa_store__xa_store() - Store this entry in the XArray
__xa_cmpxchg__xa_cmpxchg() - Store this entry in the XArray
__xa_insert__xa_insert() - Store this entry in the XArray if no entry is present.*@xa: XArray.*@index: Index into array.*@entry: New entry.*@gfp: Memory allocation flags.* Inserting a NULL entry will store a reserved entry (like xa_reserve())* if no entry is present
xa_store_rangexa_store_range() - Store this entry at a range of indices in the XArray
__xa_alloc
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
ida_freeda_free() - Release an allocated ID.*@ida: IDA handle.*@id: Previously allocated ID.* Context: Any context.
ida_destroy释放所有缓存层内IDA树
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_retry
check_xa_shrink
check_xas_erase
check_multi_store_1
check_multi_store_2
__check_store_iter
xa_store_many_order
check_create_range_4
shadow_remove
check_workingset
page_cache_delete_batchpage_cache_delete_batch - delete several pages from page cache*@mapping: the mapping to which pages belong*@pvec: pagevec with pages to delete* The function walks over mapping->i_pages and removes pages passed in @pvec* from the mapping
replace_page_cache_pageplace_page_cache_page - replace a pagecache page with a new one*@old: page to be replaced*@new: page to replace with*@gfp_mask: allocation mode* This function replaces a page in the pagecache with a new one
__add_to_page_cache_locked
__clear_shadow_entryRegular page slots are stabilized by the page lock even without the tree* itself locked. These unlocked entries need verification under the tree* lock.
shadow_lru_isolate
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.
__delete_from_swap_cacheThis must be called only on pages that have* been verified to be in the swap cache.
migrate_page_move_mappingReplace the page in the mapping.* The number of remaining references must be:* 1 for anonymous pages without a mapping* 2 for pages with a mapping* 3 for pages with a mapping and PagePrivate/PagePrivate2 set.
migrate_huge_page_move_mappingThe expected number of remaining references is the same as that* of migrate_page_move_mapping().
dax_lock_entryReturn: The entry stored at this location before it was locked.
grab_mapping_entryFind page cache entry at given index. If it is a DAX entry, return it* with the entry locked. If the page cache doesn't contain an entry at* that index, add a locked empty entry.* When requesting an entry with size DAX_PMD, grab_mapping_entry() will
__dax_invalidate_entry
dax_writeback_one
page_cache_deleteLock ordering:* ->i_mmap_rwsem (truncate_pagecache)* ->private_lock (__free_pte->__set_page_dirty_buffers)* ->swap_lock (exclusive_swap_page, others)* ->i_pages lock* ->i_mutex* ->i_mmap_rwsem (truncate->unmap_mapping_range)* ->mmap_sem* ->i_mmap_rwsem
__xa_alloc__xa_alloc() - Find somewhere to store this entry in the XArray
dax_unlock_entryWe used the xa_state to get the entry, but then we locked the entry and* dropped the xa_lock, so we know the xa_state is stale and must be reset* before use.