Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swapfile.c Create Date:2022-07-28 15:17:55
Last Modify:2020-03-17 22:19:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:page_swapped

Proto:static bool page_swapped(struct page *page)

Type:bool

Parameter:

TypeParameterName
struct page *page
1570  If Not IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_THP_SWAP) || Value is more likely to compile time(!PageTransCompound returns true for both transparent huge pages* and hugetlbfs pages, so it should only be called when it's known* that hugetlbfs pages aren't involved.) Then Return How many references to page are currently swapped out?* This does not give an exact answer when swap count is continued,* but does include the high COUNT_CONTINUED flag to allow for that. != 0
1573  page = compound_head(page)
1574  val = page_private(page)
1575  si = _swap_info_get(entry)
1576  If si Then Return swap_page_trans_huge_swapped(si, entry)
1578  Return false
Caller
NameDescribe
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.