Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap_state.c Create Date:2022-07-28 15:14:34
Last Modify:2020-03-17 22:02:06 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:void delete_from_swap_cache(struct page *page)

Type:void

Parameter:

TypeParameterName
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))
Caller
NameDescribe
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