函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:int page_swapcount(struct page *page)

返回类型:int

参数:

类型参数名称
struct page *page
1431  count等于0
1437  val等于page_private(page)
1438  p等于_swap_info_get(entry)
1439  如果p
1440  offset等于Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format
1441  ci等于Determine the locking method in use for this device. Return* swap_cluster_info if SSD-style cluster-based locking is in place.
1442  count等于swap_count(vmalloc'ed array of usage counts [offset])
1443  unlock_cluster_or_swap_info(p, ci)
1445  返回:count
调用者
名称描述
page_swapped
page_trans_huge_map_swapcount
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