函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap_state.c Create Date:2022-07-27 16:44:50
Last Modify:2020-03-17 22:02:06 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:This must be called only on pages that have* been verified to be in the swap cache.

函数原型:void __delete_from_swap_cache(struct page *page, swp_entry_t entry)

返回类型:void

参数:

类型参数名称
struct page *page
swp_entry_tentry
160  address_space等于swap_address_space(entry)
161  nr等于hpage_nr_pages(page)
162  idx等于Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format
163  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, & i_pages, idx)
165  VM_BUG_ON_PAGE(!PageLocked(page), page)
166  VM_BUG_ON_PAGE(!PageSwapCache(page), page)
167  VM_BUG_ON_PAGE(Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting., page)
169 i小于nr循环
170  entry等于xas_store() - Store this entry in the XArray
171  VM_BUG_ON_PAGE(entry != page, entry)
172  set_page_private(page + i, 0)
173  xas_next() - Move state to next index.*@xas: XArray operation state.* If the @xas was in an error state, it will remain in an error state* and this function will return %NULL. If the @xas has never been walked,
175  ClearPageSwapCache(page)
176  nrpages减等于nr
177  __mod_node_page_state(page_pgdat(page), NR_FILE_PAGES, - nr)
178  ADD_CACHE_INFO(del_total, nr)
调用者
名称描述
delete_from_swap_cacheThis must be called only on pages that have* been verified to be in the swap cache and locked.* It will never put the page into the free list,* the caller has a reference on the page.