函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap_state.c Create Date:2022-07-27 16:44:54
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 and locked.* It will never put the page into the free list,* the caller has a reference on the page.

函数原型:void delete_from_swap_cache(struct page *page)

返回类型:void

参数:

类型参数名称
struct page *page
246  swp_entry_t entry = {val = page_private(page)}
247  address_space等于swap_address_space(entry)
249  xa_lock_irq( & i_pages)
250  This must be called only on pages that have* been verified to be in the swap cache.
251  xa_unlock_irq( & i_pages)
253  put_swap_page(page, entry)
254  page_ref_sub(page, hpage_nr_pages(page))
调用者
名称描述
reuse_swap_pageWe can write to an anon page without COW if there are no other references* to it. And as a side-effect, free up its swap: because the old content* on disk will never be read, and seeking back there to write new content
try_to_free_swapIf swap is getting full, or if there are no more mappings of this page,* then try_to_free_swap is called to free its swap space.
me_swapcache_clean